bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25154: 25.1; Bindings in cl-letf are in reverse order


From: Philipp Stephani
Subject: bug#25154: 25.1; Bindings in cl-letf are in reverse order
Date: Sat, 10 Dec 2016 13:41:16 +0000



Tino Calancha <address@hidden> schrieb am Sa., 10. Dez. 2016 um 08:45 Uhr:
Eli Zaretskii <address@hidden> writes:

>> From: Alex <address@hidden>
>> Date: Fri, 09 Dec 2016 17:36:15 -0600
>>
>> Compare the following:
>>
>> (let ((x 5)
>>       (x 6))
>>   (+ x 10))
>>
>> => 16
>>
>> (cl-letf ((x 5)
>>           (x 6))
>>   (+ x 10))
>>
>> => 15
>
> Isn't it true that the order of evaluation in a 'let' is unspecified?
> If you want a particular order, use 'let*'.
Right, the order of evaluation in a let is up to the implementation.  A program
should not rely on such details.
The same statement should apply to cl-letf.




I think that should be mentioned explicitly in the manuals: given that the order of value evaluations is specified, people might expect the same for the bindings themselves.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]