Re: User-defined infix subs/methods?

2005-07-14 Thread Michele Dondi
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 all.

Re: User-defined infix subs/methods?

2005-07-14 Thread Larry Wall
On Thu, Jul 14, 2005 at 09:19:29AM +0800, Autrijus Tang wrote: : Within perl 5, there is an extremely easy way to write that, namely : coderef in @INC that provides line-based filtering: : : http://search.cpan.org/dist/Acme-use-strict-with-pride/pride.pm : : Are we to discontinue use of

Re: User-defined infix subs/methods?

2005-07-13 Thread Michele Dondi
On Tue, 12 Jul 2005, Larry Wall wrote: Good, I'd forgotten about that. Which means that it's even harder for someone to compile a module in a strange dialect, since they'd essentially have to write their own version of use that forces recompilation (reuse, if you will). And the harder we make

Re: User-defined infix subs/methods?

2005-07-13 Thread Ingo Blechschmidt
Hi, Michele Dondi wrote: Good, I'd forgotten about that. Which means that it's even harder for someone to compile a module in a strange dialect, since they'd essentially have to write their own version of use that forces recompilation (reuse, if you will). And the harder we make it to

Re: User-defined infix subs/methods?

2005-07-13 Thread Larry Wall
On Wed, Jul 13, 2005 at 05:10:14PM +0200, Michele Dondi wrote: : On Tue, 12 Jul 2005, Larry Wall wrote: : : Good, I'd forgotten about that. Which means that it's even harder : for someone to compile a module in a strange dialect, since they'd : essentially have to write their own version of use

Re: User-defined infix subs/methods?

2005-07-13 Thread Larry Wall
On Wed, Jul 13, 2005 at 05:48:47PM +0200, Ingo Blechschmidt wrote: : If you wanted the compiler to parse SomeOtherModule.pm using Ruby's : grammar, you'd have to write: : : use Grammar::Ruby; : reuse SomeOtherModule You'd also have to write reuse, because we're not going to write it for

Re: User-defined infix subs/methods?

2005-07-13 Thread Autrijus Tang
On Tue, Jul 12, 2005 at 02:10:06PM -0700, Larry Wall wrote: Good, I'd forgotten about that. Which means that it's even harder for someone to compile a module in a strange dialect, since they'd essentially have to write their own version of use that forces recompilation (reuse, if you will).

Re: User-defined infix subs/methods?

2005-07-12 Thread Autrijus Tang
On Sat, Jul 09, 2005 at 03:58:45PM -0700, Larry Wall wrote: It should take a little more effort to mess with the minds of unsuspecting modules, so maybe the standard syntax is cloned out of *STANDARD_PERL_6 or some such scary package name. It's the default for starting all require-like Perl 6

Re: User-defined infix subs/methods?

2005-07-12 Thread Larry Wall
On Tue, Jul 12, 2005 at 05:27:48PM +0800, Autrijus Tang wrote: : On Sat, Jul 09, 2005 at 03:58:45PM -0700, Larry Wall wrote: : It should take a little more effort to mess with the minds of : unsuspecting modules, so maybe the standard syntax is cloned out of : *STANDARD_PERL_6 or some such

User-defined infix subs/methods?

2005-07-09 Thread Autrijus Tang
In Pugs's ext/Set/lib/Set.pm, there are a number of user-defined infix operators. To avoid unicode in mails, I'll use a hypothetical infix:=== as the operator name. Consider the sub case: class Set; sub infix:=== (Set $x, Set $y) { ... } Is it correct that this line: Set.new ===

Re: User-defined infix subs/methods?

2005-07-09 Thread Larry Wall
On Sat, Jul 09, 2005 at 11:34:23PM +0800, Autrijus Tang wrote: : In Pugs's ext/Set/lib/Set.pm, there are a number of user-defined : infix operators. To avoid unicode in mails, I'll use a hypothetical : infix:=== as the operator name. We've intentionally been using Unicode in this mailing list on