emacs-devel
[Top][All Lists]
Advanced

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

Re: Code for cond*


From: Po Lu
Subject: Re: Code for cond*
Date: Wed, 24 Jan 2024 22:31:28 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

João Távora <joaotavora@gmail.com> writes:

> Aren't fallthrough bindings just a code smell, anyway? I mean, I've
> used that 'setq' pattern in the past, but my intention is _never_ to
> get fallthrough, but to delay a potentially expensive calculation to
> just the point where it becomes useful for a single clause.
>
> I could easily use pcase for that, and the bindings would be local to
> that clause.  If I need more clauses, I should do a sub-cond, or
> sub-pcase.  That is the way IMHO.
>
> Code-smell or not, it is nevertheless bizarre or at least unhealthy --
> multiple people have pointed that out -- that the new cond*
> fall-through bindings don't lexically wrap their users.

By your own admission, that is one of many possible honest opinions.

Mine is that every further cond form within a cond clause increases
indentation by several columns, and it is not long before both the
indentation and the nesting hinders understanding the forms concerned.
People who share this opinion have and will instinctively reach for let
and setq--unless a better alternative emerges, which this is.

Perhaps last month's scrum went over the line, and passions on both
sides were inflamed, after a fashion.  But what's the meaning of so
aggressively stonewalling a new feature, which is being introduced
unattended by any proposal to remove or replace pcase or
destructing-bind or similar?


reply via email to

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