emacs-devel
[Top][All Lists]
Advanced

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

Re: Should undefined behavior be encouraged in Emacs?


From: Stephen J. Turnbull
Subject: Re: Should undefined behavior be encouraged in Emacs?
Date: Mon, 03 Oct 2011 16:29:12 +0900

Andreas Röhler writes:
 > Am 03.10.2011 05:11, schrieb Stefan Monnier:
 > >> 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).

 > my bet: undefined behavior sources bugs, makes maintenance difficult.
 > 
 > Design at the user level certainly deserves a separate approach. It's up 
 > to implement convenient error-handling than rather than undefined behavior.

I don't know about convenient error-*handling*, but if Stefan wants to
prevent people from using the value of primitives called only for
side-effects, he can always provide "convenient error generation" by
having such primitives return Qunbound (or whatever it's called in
Emacs sources: the special uninterned symbol placed in the value slot
of an uninitialized symbol).

;-) ** 100




reply via email to

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