[Bese-devel] darcs patch: Add :fiveam to *features*

Pascal Bourguignon pjb at informatimago.com
Fri Aug 12 15:59:42 UTC 2005


Marco Baringer writes:
> Andreas Fuchs <asf at boinkor.net> writes:
> 
> > Today, Marco Baringer <mb at bese.it> wrote:
> >> Alan Shields <Alan-Shields at omrf.ouhsc.edu> writes:
> >>
> >>> Thu Aug 11 16:20:32 CDT 2005 Alan Shields
> >>> <Alan-Shields at omrf.ouhsc.edu>
> >>> * Add :fiveam to *features*
> >>> I've found that I prefer to add testing code in my other code, but I dislike
> >>> adding :fiveam to my package requirements list.
> >>
> >> i am hesitant to modify *features*, it's not really supposed to be
> >> used for this (afaict). you could do this:
> >>
> >> (defun :fiveam ()
> >>   (if (find-package :it.bese.fiveam)
> >>       '(and)
> >>       '(or)))
> >
> > Careful, there!
> 
> um, the function definition is not read in the keyword package. notice
> that the function is named :FIVEAM so you can use it like this:
> 
> #+#.(fiveam) since the string "fiveam" _will_ be read in the keyword
> package.

Why should it be read in the keyword package?

[39]> #.(zaphod-beeblebrox)


*** - EVAL: undefined function ZAPHOD-BEEBLEBROX
The following restarts are available:
USE-VALUE      :R1      You may input a value to be used instead of (FDEFINITION 'ZAPHOD-BEEBLEBROX).
RETRY          :R2      Retry
STORE-VALUE    :R3      You may input a new value for (FDEFINITION 'ZAPHOD-BEEBLEBROX).
ABORT          :R4      ABORT
Break 1 [40]> *package*
#<PACKAGE COMMON-LISP-USER>
Break 1 [40]> :a
[41]> (find-symbol "ZAPHOD-BEEBLEBROX" "KEYWORD")
NIL ;
NIL
[42]> (find-symbol "ZAPHOD-BEEBLEBROX" "COMMON-LISP-USER")
ZAPHOD-BEEBLEBROX ;
:INTERNAL


You should write:   #+#.(:fiveam)



-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Until real software engineering is developed, the next best practice
is to develop with a dynamic system that has extreme late binding in
all aspects. The first system to really do this in an important way
is Lisp. -- Alan Kay



More information about the bese-devel mailing list