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

Re: no constants please

This page is part of the web mail archives of SRFI 50 from before July 7th, 2015. The new archives for SRFI 50 contain all messages, not just those from before July 7th, 2015.



>>>>> "Tom" == Tom Lord <lord@xxxxxxx> writes:

>> From: Michael Sperber <sperber@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

Tom> SCHEME_FALSE, SCHEME_TRUE, SCHEME_NULL, and
Tom> SCHEME_UNSPECIFIC should be functions, not constants:

>> Why?

Tom> [...] because, you never know, those constants might be
Tom> heap allocated.

>> That, AFAICS, doesn't mandate the above.

Tom> Perhaps it would be clearer if I said that those constants may be
Tom> _newly_ heap allocated.

No.

Tom> It isn't GC-safe to return values which may be unprotected from GC.

Then GC-protect them.

Tom> Anyway, why is it important to write them that way?  You can't use
Tom> them with == or !=.  

Why not?

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla