At 11:53 PM 8/4/00 +0200, Jean-Louis Leroy wrote:
>(I tried to move to the
>
>Dan Sugalski <[EMAIL PROTECTED]> writes:
>
> > At 09:38 PM 8/4/00 +0200, Jean-Louis Leroy wrote:
> > >Dan Sugalski <[EMAIL PROTECTED]> writes:
> > >
> > > > This does complicate the job of the parser/lexer rather
> > > > considerably.
> > >
> > >Why? Isn't it 'just' a matter or making the lexer read from a
> > >hot-redirectable input stream?
> >
> > If it is, then it's not that big a deal, nor would it be all that
> > useful.
>
>Do you believe that simplicity and power are antithetical? I
>don't. Example? eval(), Ofrth, Lisp, the subroutine, the programmable
>computer, the Turing machine, the DNA chain...

Most of those examples are far from simple, but that's a separate issue.

> > Wiht substitutions it's more than that, and if we're going to
> > do this, we ought *not* essentially duplicate C's #define
> > stuff.
>
>Right!
>
> > [...]
> > The cleverer the preprocessor, the more work the lexer/parser needs to
> > do. Which is dandy but, as I said, if you're going to do it, do it
> > once and do it with some force.
>
>Don't you see? The preprocessor is *Perl*.

So you want to declare subs, then run the subs at compile time and replace 
the block in the source with the output from the sub? Well, that's 
ambitious, I'll give you that.

If you get this past Larry, that's fine. It won't cause many more headaches 
than BEGIN is going to. I'm not entirely sure that you want a preprocessor 
that's *that* flexible, but I did ask for it...

>Thinking about it, my proposal is even more closely related to Lisp's
>read-macros than to Forth's IMMEDIATE (*) words.
>
>(*) I'm not shouting, Forth is an all-caps language.

Only until you started changing it yourself...

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to