in reply to Re: Re: Re: Re: Re: Re^4: Perl6 syntax being too much complex? How we will teach and read that?!
in thread Perl6 syntax being too much complex? How we will teach and read that?!
I would not call that a private subroutine declaration, but an anonymous subroutine stored in a private variable. You can already do the same thing in Perl 5, except you have to say "sub" explicitly. But if you want a private sub, either of
will work.my &foo = {...}; my sub foo {...}
As for your second question, in general we'll try not to hang specialized methods off of generic classes unless they really belong. Most of these things are multi-dispatched global subs instead. (And while is probably hard-wired in the interests of giving the optimizer as much information as possible, so that it can cheat on control exceptions like "next".)
|
|---|