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

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

bug#28254: 26.0.50; SRFI-2 and-let*


From: Noam Postavsky
Subject: bug#28254: 26.0.50; SRFI-2 and-let*
Date: Sat, 2 Sep 2017 14:41:03 -0400

On Sat, Sep 2, 2017 at 9:36 AM, Mark Oteiza <mvoteiza@udel.edu> wrote:
> On 02/09/17 at 07:25am, Michael Heerdegen wrote:
>>
>> Isn't there a problem with EXPR being a symbol S, which already has a
>> different meaning (bind S to nil)?  Though, this seems barely useful to
>> me.  Anyway, introducing (EXPR) would thus be backward incompatible.

What would be the point of binding S to nil? In the foo-let macros
that would be equivalent to just putting nil (if non-list EXPRs are
supported), no?

> This single tuple special case is troublesome IMO:
>
>  (if-let* (x) "dogs" "cats") => "cats"
>  (if-let* (x (y 2)) "dogs" "cats") => (void-function y)
>  (if-let* (x (y 1) (z 2)) "dogs" "cats") => "cats"
>
> I'm curious if this was brought up in the old discussion when this was
> implemented.

I think I'd be okay with dropping support for the S = (S nil) thing in
foo-let macros, so that all of the above would give (void-variable x).
Although perhaps the incompatibility with plain let would be annoying?
To be honest I hardly ever make use of S = (S nil) in plain let either
so it wouldn't hit me at all.





reply via email to

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