[Top][All Lists]

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

Re: if-let/if-let*/and-let/..

From: Stefan Monnier
Subject: Re: if-let/if-let*/and-let/..
Date: Mon, 12 Feb 2018 12:32:06 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Resending with correct Cc.  Sorry 'bout that and thanks Mark for the
heads up,


Stefan Monnier <address@hidden> writes:

>>> This if/when/and-let/let* business looks pretty messy to me:
>>> - why do we have and-let* ?  According to its docstring the only case
>>>   when it differs from when-let* is when body is nil, but in that case
>>>   you're better off moving the last binding to the body (and use
>>>   when-let*).
>> The discussion about this was in bug#28254.  The original and-let*
>> version was much more different from `when-let*', but AFAIR Noam vetoed
>> against this version, so they got more similar in the end.
> Is it worth keeping this "more similar" result at all?
>> The original reason was that we decided that the names without "*" are
>> quite confusing and we wanted to get rid of them in the future.
> Is the benefit of slightly reducing confusion (I really find it hard to
> believe the confusion is serious, since the dependencies between the
> different steps would make it rather inconvenient to provide a real
> "parallel-let" semantics) worth the burden of those
> compatibility/obsolescence issues (I'd also mention the confusing
> aspect of having an extra * for a construct that doesn't exist without
> a *, even though traditionally the * is used to mark an "alternative"
> definition, as in list*, mapcar*, ...).
> Another question is why aren't when-let and when-let* aliases of
> each other?  Currently we have 5 variants (2 of which are deprecated)
> each with very slightly different semantics.
>         Stefan
> PS: I'm also biased against when-let* because I find this * ugly.

reply via email to

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