GNU bug report logs - #28254
26.0.50; SRFI-2 and-let*

Previous Next

Package: emacs;

Reported by: Mark Oteiza <mvoteiza <at> udel.edu>

Date: Sun, 27 Aug 2017 20:12:02 UTC

Severity: wishlist

Found in version 26.0.50

Done: Mark Oteiza <mvoteiza <at> udel.edu>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 28254 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: Mark Oteiza <mvoteiza <at> udel.edu>, 28254 <at> debbugs.gnu.org
Subject: Re: bug#28254: 26.0.50; SRFI-2 and-let*
Date: Sun, 03 Sep 2017 19:48:13 +0200
Noam Postavsky <npostavs <at> users.sourceforge.net> writes:

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

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.


Michael.




This bug report was last modified 7 years and 253 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.