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


Another suggestion for a basic facility which would
greatly increase the user programmability:

How about adding a psuedo simple transformation :IF
with the syntax (:IF condition (transf) (transf)).
Typically the condition would test a special variable
set by a keyword.  This would provide a very general
method of conditionalizing the construction of systems based on
switches.  I tried to construct this behavior two ways
but finally concluded it has to be installed as a builtin
feature.  First I tried to do it as a defsystem-macro
which would be called as follows (with the appropriate
extra stuff to define :IF and a local variable for the
switch and a keyword to set it, etc.)

      (:IF *SWITCH* (:MODULE FOO "foo1") (:MODULE FOO "foo2"))
      (:FASLOAD FOO))

but this lost because the condition was evaluated at
the time the defsystem was DEFINED instead of when MAKE-SYSTEM
was called.

Then I thought of trying to make :FASLOAD-IF a simple transformation
so I could say:


but that lost too because the syntax for simple transformations
is fixed by the parser. 

I really think this would be a good idea.   --Chuck.