[imp-hackers] LOOP non-compliance

Nikodemus Siivola nikodemus at random-state.net
Mon Apr 9 09:59:04 UTC 2012


On 8 April 2012 20:46, Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> wrote:

>> To play the devil's advocate here for a second, if we agree to take
>> strict view of LOOP clause ordering, will others also take strict view
>> of non-EQL DEFCONSTANTs like this?
>>
>>  (defconstant +unportable+ "foo")

> Sounds fair. What restarts does SBCL set up in this case? Is it a
> correctable error?

The error occurs when a DEFCONSTANT is evaluated where the value is
not EQL to the old one: typically whenever you file-compile and then
load into the same session a DEFCONSTANT that is not a character,
symbol, or number.

Condition signaled is SB-EXT:DEFCONSTANT-UNEQL, with accessors
SB-EXT:DEFCONSTANT-UNEQL-NAME, -OLD-VALUE and -NEW-VALUE.

CONTINUE restart changes the value.

ABORT restart keeps the old value.

(Though those restarts aren't documented -- they're just what is in
place right now. USE-VALUE would be a good addition.)

I'll give you a fair warning, though: this is probably the most hated
feature of SBCL...

Cheers,

 -- nikodemus




More information about the implementation-hackers mailing list