[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should undefined behavior be encouraged in Emacs?
From: |
Eli Zaretskii |
Subject: |
Re: Should undefined behavior be encouraged in Emacs? |
Date: |
Mon, 03 Oct 2011 05:52:15 -0400 |
> Date: Mon, 3 Oct 2011 09:20:46 +0000
> From: Alan Mackenzie <address@hidden>
> Cc: Paul Eggert <address@hidden>, Emacs Development <address@hidden>
>
> Hi, Stefan.
>
> On Sun, Oct 02, 2011 at 11:11:58PM -0400, Stefan Monnier wrote:
> > > The argument given for undefined behavior is that it simplifies
> > > maintenance of Emacs internals.
>
> > I like to keep some corner of the behavior undefined, when I think
> > that user code that depends on such details is undesirable (e.g. return
> > values of primitives which are only called for side-effects).
>
> There are few functions called solely for side effects. For example,
> `goto-char' is frequently found thusly:
> ...
> Surely the return value of things like `goto-char' should be
> defined?
Since this discussion is about to veer sideways, I'd like to make it
clear that I didn't mean something like goto-char's return value at
all. What I meant is the behavior of Lisp primitives and subroutines
when they are called with invalid arguments, such as buffer positions
that are non-positive.
The original example was that an overlay was moved to start at
position zero and end on position 1, and Paul wanted such an overlay
to be considered empty, because he _expected_ position zero to be
always treated as position 1.
- Re: Should undefined behavior be encouraged in Emacs?, (continued)
- Re: Should undefined behavior be encouraged in Emacs?, Barry Warsaw, 2011/10/07
- Re: Should undefined behavior be encouraged in Emacs?, ken manheimer, 2011/10/07
- Re: Should undefined behavior be encouraged in Emacs?, Barry Warsaw, 2011/10/07
- Re: Should undefined behavior be encouraged in Emacs?, Óscar Fuentes, 2011/10/07
- Re: Should undefined behavior be encouraged in Emacs?, ken manheimer, 2011/10/07
- RE: Should undefined behavior be encouraged in Emacs?, Drew Adams, 2011/10/07
- Re: Should undefined behavior be encouraged in Emacs?, Miles Bader, 2011/10/08
- RE: Should undefined behavior be encouraged in Emacs?, Drew Adams, 2011/10/08
- Re: Should undefined behavior be encouraged in Emacs?, Stefan Monnier, 2011/10/03
Re: Should undefined behavior be encouraged in Emacs?, Alan Mackenzie, 2011/10/03
- Re: Should undefined behavior be encouraged in Emacs?,
Eli Zaretskii <=
Re: Should undefined behavior be encouraged in Emacs?, Andreas Schwab, 2011/10/03
Re: Should undefined behavior be encouraged in Emacs?, Richard Stallman, 2011/10/03
Re: Should undefined behavior be encouraged in Emacs?, Eli Zaretskii, 2011/10/03
Re: Should undefined behavior be encouraged in Emacs?, Richard Stallman, 2011/10/03