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: Paul Eggert <eggert@cs.ucla.edu>
Cc: Yuri Khan <yurivkhan@gmail.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Why is there no `until' in elisp?
Date: Wed, 17 Oct 2018 23:49:36 +0200	[thread overview]
Message-ID: <87woqg5jm7.fsf@portable.galex-713.eu> (raw)
In-Reply-To: <5e6f544e-811f-fc0a-bc08-e77d601a4c4d@cs.ucla.edu> (Paul Eggert's message of "Wed, 17 Oct 2018 14:35:13 -0700")

Le 17/10/2018 à 14h35, Paul Eggert a écrit :
> On 10/17/18 2:15 PM, Garreau, Alexandre wrote:
>> “while” as used in natural language does *not* mean the same thing
>
> […] And the same is true for "until".

How’s that?

> But I'm not objecting to the keyword's spelling: I'm objecting to a
> syntax where a condition C is placed immediately before a place where
> C is false. This is confusing! When I read "C" I should be mentally
> thinking "OK, now C is true". This is elementary notation design.

I’m not.  If it works in english such as “until you have money you will
not be able to buy it” I don’t see the problem.

>> It is still more natural and meaningful to say “until I’m not hungry
>> anymore I eat” instead of “while I’m hungry I eat”,
>
> Not at all. Most English-speakers would say that the latter is far
> more readable.

Certainly more readable, because it is simpler.  But how about *more
natural*?  I find “until” be a lot more used in all the languages I
know, including english.

>>> the Elisp syntax for the proposed loop construct should *not* be
>>> (until C S).
>>
>> And what should it be then?
>
> Why not use cl-loop? Although it's not perfect it's good enough, and
> it's better than introducing a seemingly-simple but deeply confusing
> syntax.

The most obvious and only implementation of `unless', I ever seen *until
now* is (while (not cond) body) (see how this sentence breaked your rule
while being the more natural formulation).  It’s only subjectively, thus
seemingly, deeply confusing, thus “not perfect” as well, yet “good
enough” in my mind, so to make programs easier to read and write, while
cl-loop is deeply, not only seemingly, complex, especially about its
syntax: so it’s the other way around I’d say (though cl-loop too accepts
both post- and pre-cond afaik).



  reply	other threads:[~2018-10-17 21:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-16 17:42 Why is there no `until' in elisp? Garreau, Alexandre
2018-10-16 19:16 ` Eric Abrahamsen
2018-10-16 19:31   ` Garreau, Alexandre
2018-10-16 20:23     ` Eric Abrahamsen
2018-10-16 23:00       ` Garreau, Alexandre
2018-10-19 15:28   ` Stefan Monnier
2018-10-16 21:28 ` Stefan Monnier
2018-10-17  0:12   ` Garreau, Alexandre
2018-10-17  2:04     ` Stefan Monnier
2018-10-17  9:14       ` Garreau, Alexandre
2018-10-17 15:06         ` Stefan Monnier
2018-10-17 16:51           ` Garreau, Alexandre
2018-10-19 15:34     ` Stefan Monnier
2018-10-19 18:08       ` Garreau, Alexandre
2018-10-17  8:04   ` Yuri Khan
2018-10-17  9:23     ` Garreau, Alexandre
2018-10-17  9:46       ` Yuri Khan
2018-10-17 11:06         ` Garreau, Alexandre
2018-10-17 17:50         ` Paul Eggert
2018-10-17 21:15           ` Garreau, Alexandre
2018-10-17 21:35             ` Paul Eggert
2018-10-17 21:49               ` Garreau, Alexandre [this message]
2018-10-17 22:33                 ` Paul Eggert
2018-10-17 22:54                   ` Garreau, Alexandre
2018-10-17 12:41     ` Elias Mårtenson
2018-10-17 15:03     ` Stefan Monnier

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=87woqg5jm7.fsf@portable.galex-713.eu \
    --to=galex-713@galex-713.eu \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=yurivkhan@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.