[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: NIL at MIT-MC
- Subject: PUT/GET
- From: Kent M. Pitman <KMP at MIT-MC>
- Date: Wed, 5 Mar 80 19:30:00 GMT
- Cc: BUG-LISP at MIT-MC
- Original-date: 5 March 1980 14:30-EST
I also propose that GET be renamed *GET and GET be allowed an optional
extra argument which would specify the return value. eg,
(GET sym prop [ default ])
(*= Or appropriate surrogate such as CDR-able list...)
would return the sym's prop property or default if no such property existed.
The default default should still be () for compatibility AND because that's
an awfully reasonable thing to return most of the time anyway...
One might even want to allow a fourth argument (setp, default ()) which said
whether or not to actually add DEFAULT as a property if it was unseen (saves
having to scan the plist later or having to do SETPLIST to get around it ...
Maybe there should be a *PUT which does a PUT without looking to see if the
property already exists -- just does the splice.
Given the proliferation of PUT/GET functionality, I think it's worthwhile
to at least examine some of the functionality we often try for and what we
have to do to get it ... A few more options, discretely located as defaultable
args, would not seem unreasonable. Comments?