[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why is there no `until' in elisp?
From: |
Stefan Monnier |
Subject: |
Re: Why is there no `until' in elisp? |
Date: |
Fri, 19 Oct 2018 11:34:01 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> think `until' should refer to the version I gave because this is
> probably the one which is going to be implemented naively by most
> people,
BTW, this is only true if those people have to implement it on top of
the pre-existing `while`. Once you go down to implementing it as
a sequence of byte-codes, then the `until` you proposed is no simpler
than the one I proposed.
So reversing your argument, if Elisp had my `until` and you wanted to
define `while` would you define it to return nil or to return t?
IOW would you define it as
(defmacro while (test &rest body)
`(until (not ,test) ,@body))
or
(defmacro while (test &rest body)
`(progn (until (not ,test) ,@body) nil))
?
Stefan
Re: Why is there no `until' in elisp?, Stefan Monnier, 2018/10/16
- Re: Why is there no `until' in elisp?, Garreau\, Alexandre, 2018/10/16
- Re: Why is there no `until' in elisp?, Stefan Monnier, 2018/10/16
- Re: Why is there no `until' in elisp?, Garreau\, Alexandre, 2018/10/17
- Re: Why is there no `until' in elisp?, Stefan Monnier, 2018/10/17
- Re: Why is there no `until' in elisp?, Garreau\, Alexandre, 2018/10/17
Re: Why is there no `until' in elisp?,
Stefan Monnier <=
Re: Why is there no `until' in elisp?, Garreau\, Alexandre, 2018/10/19
Re: Why is there no `until' in elisp?, Yuri Khan, 2018/10/17
- Re: Why is there no `until' in elisp?, Garreau\, Alexandre, 2018/10/17
- Re: Why is there no `until' in elisp?, Yuri Khan, 2018/10/17
- Re: Why is there no `until' in elisp?, Garreau\, Alexandre, 2018/10/17
- Re: Why is there no `until' in elisp?, Paul Eggert, 2018/10/17
- Re: Why is there no `until' in elisp?, Garreau\, Alexandre, 2018/10/17
- Re: Why is there no `until' in elisp?, Paul Eggert, 2018/10/17
- Re: Why is there no `until' in elisp?, Garreau\, Alexandre, 2018/10/17
- Re: Why is there no `until' in elisp?, Paul Eggert, 2018/10/17