[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What's up with apply-partially?
From: |
Stefan Monnier |
Subject: |
Re: What's up with apply-partially? |
Date: |
Sun, 25 Jan 2015 09:32:44 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
>>> I have been wondering this myself. I wonder if it was a workaround from
>>> the time when lexical-binding was not activated in subr.el?
>> Yes, I think this is the explanation. Feel free to change it,
> Huh. Perhaps this causes different behavior depending on whether the
> _use_ of apply-partially happens in a file with lexical-binding being
> `nil'?
No.
> Or the use of the function defined using it?
Neither.
> After all, apply-partially was first defined when lexical binding was
> not available in Emacs.
That's right, but it was defined differently then. When lexical-binding
appeared, it made it possible to re-implement apply-partially
differently so as to avoid the problem of name-capture. That's the code
in use now. At that time, subr.el was not yet using lexical-binding, so
I did not just use a "normal closure".
> So some uses might depend on particular
> semantics in non-lexical-binding files?
No.
Stefan
- What's up with apply-partially?, David Kastrup, 2015/01/23
- Re: What's up with apply-partially?, Leo Liu, 2015/01/23
- Re: What's up with apply-partially?, Stefan Monnier, 2015/01/24
- Re: What's up with apply-partially?, David Kastrup, 2015/01/24
- Re: What's up with apply-partially?,
Stefan Monnier <=
- [PATCH] Let apply-partially make use of lexical binding in subr.el, David Kastrup, 2015/01/25
- Re: [PATCH] Let apply-partially make use of lexical binding in subr.el, David Kastrup, 2015/01/27
- Re: [PATCH] Let apply-partially make use of lexical binding in subr.el, Stefan Monnier, 2015/01/29
- Re: [PATCH] Let apply-partially make use of lexical binding in subr.el, David Kastrup, 2015/01/29
Re: What's up with apply-partially?, Artur Malabarba, 2015/01/23