[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Arguments and values to get.
- To: Gregor.pa@XEROX.ARPA
- Subject: Arguments and values to get.
- From: "Scott E. Fahlman" <Fahlman@C.CS.CMU.EDU>
- Date: Fri, 20 Sep 1985 01:19:00 -0000
- Cc: cl-object-oriented-programming@SU-AI.ARPA, Common-Lisp@SU-AI.ARPA
- In-reply-to: Msg of 19 Sep 1985 19:39-EDT from Gregor.pa at Xerox.ARPA
- Sender: FAHLMAN@C.CS.CMU.EDU
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.