all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Garreau\, Alexandre" <galex-713@galex-713.eu>
To: Noam Postavsky <npostavs@gmail.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: dolist considered harmful
Date: Thu, 01 Nov 2018 00:01:10 +0100	[thread overview]
Message-ID: <871s85souh.fsf@portable.galex-713.eu> (raw)
In-Reply-To: <CAM-tV-8h0kg4ECBfH+B8S-=6iF5Zi9AnYkOWG-2vxyptOg27gw@mail.gmail.com> (Noam Postavsky's message of "Wed, 31 Oct 2018 18:44:54 -0400")

On 2018-10-31 at 18:44, Noam Postavsky wrote:
> On Wed, 31 Oct 2018 at 18:10, Garreau, Alexandre <galex-713@galex-713.eu> 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	other threads:[~2018-10-31 23:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-30 18:39 dolist considered harmful Stefan Monnier
2018-10-30 19:31 ` Eli Zaretskii
2018-10-30 23:24 ` Jay Kamat
2018-10-30 23:29   ` Noam Postavsky
2018-10-30 23:47     ` Drew Adams
2018-10-31 22:02 ` Garreau, Alexandre
2018-10-31 22:44   ` Noam Postavsky
2018-10-31 23:01     ` Garreau, Alexandre [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871s85souh.fsf@portable.galex-713.eu \
    --to=galex-713@galex-713.eu \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=npostavs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.