Perl6 Macros

2002-03-26 Thread Michel J Lambert
I searched the archives with Google (what, no internal search engine??), and found the thread on perl6 macros, which I did read. >From what I saw, it mostly concentrated on using macros for speed. That should be a minor argument, especially considering this is perl. :) Common Lisp macros are inc

Re: Topicalizers: Why does when's EXPR pay attention to topicalizer r egardless of associated variable?

2002-03-26 Thread Aaron Sherman
On Thu, 2002-03-21 at 12:52, Allison Randal wrote: > On Wed, Mar 20, 2002 at 09:59:35AM -0800, Larry Wall wrote: > > > > I should update y'all to my current thinking, which is that $_ is > > always identical to the current topic, even if the topic is aliased to > > some other variable. To get at

Re: Topicalizers: Why does when's EXPR pay attention to topicaliz er r egardless of associated variable?

2002-03-26 Thread Larry Wall
Aaron Sherman writes: : On Thu, 2002-03-21 at 12:52, Allison Randal wrote: : > On Wed, Mar 20, 2002 at 09:59:35AM -0800, Larry Wall wrote: : > > : > > I should update y'all to my current thinking, which is that $_ is : > > always identical to the current topic, even if the topic is aliased to : >

Re: Perl6 Macros

2002-03-26 Thread Michel J Lambert
> macro foo($a,$b) { > return( $c // $a+$b ); > } > > print foo(1,2), "\n"; > my $c=100; > print foo(1,2) "\n"; Yeah, your example provided is correct. It's called variable capture, and there's some work required by common lisp macros to ensure that unwanted variable capture does not occur.