Re: Macro arguments themselves

2003-09-12 Thread Austin Hastings
--- Luke Palmer <[EMAIL PROTECTED]> wrote: > Alex Burr writes: > > But I confidently predict that no-one with write a useful > > partial evaluator for perl6. The language is simply too big. > > Then again, there are some very talented people with a lot of free > time in the Perl community; I wou

Re: Macro arguments themselves

2003-09-12 Thread Mark A. Biggar
Alex Burr wrote: [EMAIL PROTECTED] (Luke Palmer) writes: I would hope the former. However, what about this compile-time integral power macro[1]? macro power ($x, $p) { if $p > 0 { { $x * power($x, $p-1) } } else { { 1 } } } That would hopef

Re: Macro arguments themselves

2003-09-12 Thread Luke Palmer
Alex Burr writes: > In theory you could write one as a perl6 macro, although it would be > more convenient if there was someway of obtaining the syntax tree of a > previously defined function other than quoting it (unless I've missed > that?). There is a large class of cool optimizations possibl

Re: Subject: Macro arguments themselve

2003-09-12 Thread Alex Burr
[EMAIL PROTECTED] (Luke Palmer) writes: > I would hope the former. However, what about this compile-time > integral power macro[1]? > > macro power ($x, $p) { > if $p > 0 { > { $x * power($x, $p-1) } > } > else { > { 1 } > } > } > >

Re: Macro arguments themselves

2003-09-12 Thread Alex Burr
[EMAIL PROTECTED] (Luke Palmer) writes: > I would hope the former. However, what about this compile-time > integral power macro[1]? > > macro power ($x, $p) { > if $p > 0 { > { $x * power($x, $p-1) } > } > else { > { 1 } > } > } >