unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Why is there no `until' in elisp?
@ 2018-10-16 17:42 Garreau, Alexandre
  2018-10-16 19:16 ` Eric Abrahamsen
  2018-10-16 21:28 ` Stefan Monnier
  0 siblings, 2 replies; 26+ messages in thread
From: Garreau, Alexandre @ 2018-10-16 17:42 UTC (permalink / raw)
  To: emacs-devel

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))



^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2018-10-19 18:08 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).