emacs-devel
[Top][All Lists]
Advanced

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

Re: dolist considered harmful


From: Garreau\, Alexandre
Subject: Re: dolist considered harmful
Date: Thu, 01 Nov 2018 00:01:10 +0100
User-agent: Gnus (5.13), GNU Emacs 25.1.1 (i686-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian

On 2018-10-31 at 18:44, Noam Postavsky wrote:
> On Wed, 31 Oct 2018 at 18:10, Garreau, Alexandre <address@hidden> wrote:
>>
>> On 2018-10-30 at 14:39, Stefan Monnier wrote:
>> > All this pcase-dolist discussion made me take a second look at dolist
>> > and now I wondering whether we should keep it:
>>
>> This is still extreme: I never saw anyone suggesting to remove anything
>> about pcase or its derivative… but I can get quite distracted sometimes
>> so maybe I missed it.
>
> Not pcase, but Alan talked about removing pcase-dolist and other derivatives:
>
> https://lists.gnu.org/archive/html/emacs-devel/2018-10/msg00664.html
>
>     If we can't get quality doc strings for pcase-dolist and friends, I say
>     we should remove them from Emacs.  There are only around 30 occurrences
>     of pcase-dolist.

These are cool, and really beautiful examples of what it means to
efficiently (in terms of semantics) generalize a high-level behavior
pattern to outside things (if I wasn’t fearing pattern-matching to
exageratedly spread, I’d even suggest for these to become the default as
replacement of their non-pcase versions, as I already desired once (I
dislike their current syntax but they happen to be potentially
backward-compatible to all others lisp (pattern-)match(ing) that I would
find acceptable)…).

If ever that much needed I’d like to help improving all these docstrings
so they keep existing.  But I feel like there’s a stronger global will
to improve these anyway.

>> (btw is emacs tail-recursive?),
>
> Nope. Which is why recursion is not idiomatic.

Oh.  I once heard emacs was “kind of, too, a naive implementation of
lisp”, and each day I discover it is effectively a bit more than I
initially though.  …so it may end up with bignums before tail-recursion,
I wonder if that’s not to be considered very surprising.



reply via email to

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