[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Arguments and values to get.
Why does Common-Lisp GET take a default-value argument instead of
returning a second value indicating whether the property actually
The default argument is useful in some cases, but admittedly is a bit
inelegant -- if you want to know for sure whether a value was found, you
have to be careful to choose some default argument that couldn't
possibly be stored in any property list. The reasoning (If I recall it
correctly) was that this occasional creation of a unique default is less
hassle than having to write an ugly multiple-value-bind every time we
want to return a default value in the property-not-found case. I'm not
sure I believe that any more.