[Top][All Lists]

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

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

From: Michael Heerdegen
Subject: bug#28254: 26.0.50; SRFI-2 and-let*
Date: Sun, 03 Sep 2017 19:48:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Noam Postavsky <address@hidden> writes:

> On Sat, Sep 2, 2017 at 9:36 AM, Mark Oteiza <address@hidden> 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?

Eh hmm - yes, I think so.  It isn't useful.

> 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.

I think the main use case is to declare a local variable when you don't
care about the init value.  In the case of if-let, S = (S nil) is not
useful, since you can't use that binding neither in the "then" clause
(because it won't be executed) nor in the "else" clauses (which ignore
all bindings).

Even if an `if-let' form is the result of a macro expansion, the S = (S
nil) case isn't of any value.  So I see no reasons to not drop support
for it.


reply via email to

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