Luke Palmer <[EMAIL PROTECTED]> writes:

> Yes, it's possible to have two routines with the same name which
> differ by signature... however, in Perl 6, C<for> has only one
> signature, and it's the one above.  The C<for> loop you are thinking
> of is spelled C<loop>, 
  
Oh, yes, forgot about that.

> To the contrary, C<while> and C<if> take only a single expression in
> scalar context, whereas C<for> takes a list in flattening list
> context.

*light dawns*
 
That's what I get for trying to start reading in the middle of a
thread, I guess.

> > Methinks that a signature should be able to call for a code block
> > in braces, and when it's called the signature after that code
> > block should be optional.
> 
> You mean s:2nd/signature/semicolon/ ?

Yes, that was a thinko.  I thought I typed semicolon there.

> This has already been discussed at length.  The answer is "um". :-)

I see.

> So far documented, the semicolon is only optional when the closing
> brace is the only thing on the line.  Don't worry, Larry's got a
> handle on this one, and I don't think it needs further discussion.

Cool.

> >     Fooey, English is weird, let's stick with Perl.
>
> Hmm, that last quote seems a little odd when placed next to your
> signature... :-)

What, my little pathetic attempt at a JAPH?  It's only even slightly
hard to follow if you don't understand closures.  Nothing like some of
the clever monstrosities I've seen floating around on the net.

-- 
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,"[EMAIL PROTECTED]/ --";$\=$ ;-> ();print$/

Reply via email to