On Wed, Apr 29, 2009 at 04:33:44PM -0400, Mark Mielke wrote:
> Hakim Cassimally wrote:
>> I wanted to be able to write:
>>
>> my $x = given ($blah) {
>> ....
>> default { 'foo' }
>> }
>>
>> ...
>> Is there a way to work around this limitation?
>> And would it be worthwhile me submitting a docpatch to perlsyn?
>>
>
> Seems like along that path would lie:
>
> my $x = if ($blah) { ... } else { 'foo' };
And a bit further along:
if ($foo) {$x} else {$y} = if ($bar) {'lala'} else {'lurf'};
> Some part of me finds your expectation appealing and some part of me is
> revolted. :-)
I think one of more of the ALGOL variants allowed my line above
(translated to ALGOL of course).
Abigail
Thread Previous
|
Thread Next