emacs-devel
[Top][All Lists]
Advanced

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

Why is there no `until' in elisp?


From: Garreau\, Alexandre
Subject: Why is there no `until' in elisp?
Date: Tue, 16 Oct 2018 19:42:11 +0200
User-agent: Gnus (5.13), GNU Emacs 25.1.1 (i686-pc-linux-gnu)

Sometimes I have the strong feeling that the symetric of “while”,
“until” [0], unlike in many languages such as C, exists in elisp.  That
happened to me several times, and usually I bug for about an hour before
to realize I do this confusion because it has the symetric of “when”:
“unless”, but not the same for “while”.

However, “until” exists, for instance in bash (which has no “unless”…
maybe because it has no “when” because it has guarded “if”s?), and I
find it pretty handy for making stuff more readable and avoiding making
stuff more complex…

Is there a particular rational or style reason for not using a such
trivial and obvious (both in terms of implementation and
understandement) construct?

If not so, why isn’t it in elisp, aside of `when' and `unless' in
subr.el (if that ought to be the correct file?)?

[0] such as: (defmacro until (test &rest body) (declare (indent 1))
`(while (not ,test) ,@body))



reply via email to

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