develooper Front page | perl.perl6.language | Postings from July 2005

Re: User-defined infix subs/methods?

Thread Previous | Thread Next
Michele Dondi
July 14, 2005 02:08
Re: User-defined infix subs/methods?
Message ID:
On Wed, 13 Jul 2005, Ingo Blechschmidt wrote:

> no, if I understood Larry correctly, you can of course write a nice
> grammar-modifying module, but other modules you use() still use
> Perl 6's standard grammar. E.g.:

Ah, then of course I would have never expected things to be different at 

> If you wanted the compiler to parse using Ruby's
> grammar, you'd have to write:
>    use Grammar::Ruby;
>    reuse SomeOtherModule

So that, after all, I don't think it would be much used since if 
SomeOtherModule was thought to be parsed according to Grammar::Ruby, it 
would take care of using it in the first place, I guess.

Unless, of course, SomeOtherModule could be parsed correctly -and 
hopefully behave differently- under two or more different grammars, in 
which case it would be funny to see the effects of, say,

use Grammar::Ruby;
reuse SomeOtherModule;
use Grammar::hq9plus;
reuse SomeOtherModule;
# ...

which reminds me of good'ol' "GEB"...

Never attribute to malice that which
can be adequately explained by stupidity
- "Hanlon's Razor"

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About