bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#20241: 25.0.50; `setq' with only one argument


From: Drew Adams
Subject: bug#20241: 25.0.50; `setq' with only one argument
Date: Wed, 25 Nov 2015 13:19:32 -0800 (PST)

j> Ok, let's go with this then:
j>     Evaluation:  Run-time error
j>     Compilation: Compile-time warning
j>     Execution:   Run-time error (same as Evaluation)
j> I think that's the convergence point for the three of us, amirite?
 
Exactly what I prefer.

(Dunno the difference between a compiler warning and error in
our context.  To me, this is the compiler letting you know that
your code has a syntax error.  But the form that message takes
is probably a warning.)

a> Or, alternatively, we could explicitly say that whether the first 8
a> assignments are carried out before signaling the error is undefined.
a> This should deter over-clever hackers from trying to catch the
a> wrong-number-of-args error, expecting the code to have done something
a> predictable.

The behavior should altogether be undefined.  This is an
implementation detail that users should not count on.

Probably we do not need to, and should not, say anything
about what happens if you do not respect the syntax.
You will get an error, and it will be up to you to figure
out what side effects might have occurred before the error
was raised.

But IMO it would be best if the `setq' implementation tested
its arglist and raised an error at the outset, before doing
anything.  Even if it is fixed to do that, we should not
advertise it.





reply via email to

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