Re: r25821 - docs/Perl6/Spec

2009-03-19 Thread Carl Mäsak
Jonathan (>): > O AKSHUALY...that's quite easy to do, since we just calls .WHAT on the value > to get its proto-object and stick it in the sig. So perhaps best is just to > re-define: > > multi sub fib (LITERAL) { ... } > > As meaning > > multi sub fib (LITERAL.WHAT $ where LITERAL) { ... } I like

Re: r25821 - docs/Perl6/Spec

2009-03-18 Thread Jonathan Worthington
Mark J. Reed wrote: Shouldn't that desugar to (Int $ where 0)? After all, 0.WHAT is Int... Yes, I proposed that in my second reply too, after realizing .WHAT gave us that too. :-) Of course, then someone will expect multi sub fib (0|1) { return @_[0] } to DTRT here... That's fine, bec

Re: r25821 - docs/Perl6/Spec

2009-03-18 Thread Mark J. Reed
2009/3/18 Moritz Lenz : >> +You can leave out the block when matching against a literal value of some >> +kind: >> + >> +    multi sub fib ($n where 0|1) { return $n } >> +    multi sub fib (Int $n) { return fib($n-1) + fib($n-2) } >> + >> +In fact, you can leave out the 'where' declaration altoget

Re: r25821 - docs/Perl6/Spec

2009-03-18 Thread Jonathan Worthington
Jonathan Worthington wrote: Moritz Lenz wrote: pugs-comm...@feather.perl6.nl wrote: +You can leave out the block when matching against a literal value of some +kind: + +multi sub fib ($n where 0|1) { return $n } +multi sub fib (Int $n) { return fib($n-1) + fib($n-2) } + +In fact, yo

Re: r25821 - docs/Perl6/Spec

2009-03-18 Thread Jonathan Worthington
Moritz Lenz wrote: pugs-comm...@feather.perl6.nl wrote: +You can leave out the block when matching against a literal value of some +kind: + +multi sub fib ($n where 0|1) { return $n } +multi sub fib (Int $n) { return fib($n-1) + fib($n-2) } + +In fact, you can leave out the 'where' d

Re: r25821 - docs/Perl6/Spec

2009-03-18 Thread Moritz Lenz
pugs-comm...@feather.perl6.nl wrote: > Author: masak > Date: 2009-03-14 13:34:42 +0100 (Sat, 14 Mar 2009) > New Revision: 25821 > > Modified: >docs/Perl6/Spec/S12-objects.pod > Log: > specced syntactic 'where' sugar in param lists > > Modified: docs/Perl6/Spec/S12-objects.pod > ==

r25821 - docs/Perl6/Spec

2009-03-14 Thread pugs-commits
Author: masak Date: 2009-03-14 13:34:42 +0100 (Sat, 14 Mar 2009) New Revision: 25821 Modified: docs/Perl6/Spec/S12-objects.pod Log: specced syntactic 'where' sugar in param lists Modified: docs/Perl6/Spec/S12-objects.pod === --- d