in reply to Switch.pm gotchas?

Has there been any discussion of providing support for syntax extension in Perl 6? I know some things are possible in Perl 5, like Switch, but it seems hard to implement and dangerous.

I know Perl 6 has a Switch statement, but it'd be cool if there was support for a powerful integrated macro processor that would allow things like Switch to be implemented conveniently.

I know, I know, feature creep, untried, Second System effect, hard to integrate macro expansion with debuggers in a way that's intuitive to use, focus on getting something out the door... I'm just thinking out loud.

Replies are listed 'Best First'.
Re^2: Switch.pm gotchas?
by Aristotle (Chancellor) on Sep 24, 2002 at 14:39 UTC
    The reason source filters are problematic in Perl5 is that "only perl can parse Perl" (ie only the perl binary knows exactly how to parse source written in the language Perl). Perl6 however will come with its own grammar built into itself for use by a script; I'd imagine it'll pretty simple to write robust source filters.

    Makeshifts last the longest.