Newsgroups: perl.perl6.language
From: la...@wall.org (Larry Wall)
Date: Wed, 19 Nov 2003 10:19:06 -0800
Local: Wed, Nov 19 2003 1:19 pm
Subject: Re: Control flow variables
On Wed, Nov 19, 2003 at 08:08:49AM +1100, Damian Conway wrote: : : Michael Lazzaro wrote: : >So, just to make sure, these two lines are both valid, but do completely : >different things: : > : > return if $a; : : Means: : : if ($a) { return } : : : > return if $a { $a } : : Means: : : if ($a) { return $a } else { return undef } No, it's a syntax error. You must write return do { if $a { $a } } to mean that. At least in my version of Perl 6. AIFIYP. Sentences are a basic concept in all human languages. I've decided It may well be that there is a generalization to be made here, but Also, since multi is orthogonal to naming, it'd be possible to define multi sub *statement:if (... But that sort of generality would completely screw up the optimizer, Larry You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||