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



When we designed a conditionalization feature for LSB, it was decided
that anything that had to understand a "foreign" syntax in order to
flush it was a loss.  We do it by
  {predicate any-text-at-all-with-balanced-curly-braces}
The predicate is read by READ and evaluated.  (ONLY-FOR LISPM) is
like #+LISPM.  If it evals to NIL, the text is flushed (splicing readmacro
style);  otherwise it is left there, and global flag hacks cause the matching
right brace to disappear (but it will act as a break).
The restrictions are that this conditionalized structure is a reader
break, and that the contained text must have matching braces.  There
is currently no way to "quote" them, so if one or the other must appear
in the text, a matching one should be placed nearby, appropriately
commented out.  (I think midas has crocks like this, but i'm not sure.)
The feature is that no understanding of the stuff being conditionalized
is necessary.  This greatly simplifies the usage in the long run, and
tends to prevent screws like the one you mentioned, even if only by
limiting their number to those that come from not balancing the braces
or something like that.  (The one i ran into using #Q was conditionalizing
the readin of a small-flonum.)
    I'm not necessarily advocating the adoption of something like this,
but i would be greatly grossed out if hacks were put in to "sort of"
make the sharpsign conditionalization work this way.  Then again, if
people want this as a general feature, the conditionalization stuff
could be separated out of LSB.