On Fri, Sep 17, 2004 at 08:19:37AM -0600, Patrick R. Michaud wrote:
: I'm going to go with a syntactic shortcut for the time being, albeit
: something more complex than the suggestion above.  I don't want to force
: people to make multi-line closures.  It will probably look for matching
: braces, skipping over quoted strings and anything with a backslash in
: front of it.  Yes, I know it's possible to construct cases where this
: won't do the right thing -- I'm just trying to get something usable for
: now.

I think in the long run we'll have those inner compilers that know how to
stop themselves and can be handed a closure, and those that don't know how
to stop, and must be spoonfed the right amount, which is almost always
an even number of lines, which suggests to me that the syntax for those
languages should look like a here doc, which lets you pick a trailing
delimiter you know is unlikely to occur in the target language.  (Nothing
says you couldn't use that for a self-terminating language as well.)
So maybe you want to aim your shortcut at something like:

    / (\d) <here: ENDPIR> /
    ...
    ENDPIR

: In the long run I'm thinking we may just leave the syntactic shortcut 
: in place, for those compilers that don't (or can't?) provide all of the 
: "parse one closure, tell me how many characters you used" semantics 
: we'd need.  Maybe we'll have a rule option that says "don't use the 
: closure syntax shortcut, call the compiler directly", or have the rule 
: automatically decide what to do based on the properties of the 
: (inner) compiler.

I'd be much happier about leaving a here-doc solution in place than a
bracket counting bandaid.

Larry

Reply via email to