develooper Front page | perl.perl6.language | Postings from June 2006

Re: Perl5 -> Perl 6 Translations Design Document

Thread Previous | Thread Next
From:
Jonathan Worthington
Date:
June 5, 2006 18:00
Subject:
Re: Perl5 -> Perl 6 Translations Design Document
Message ID:
0ce201c68905$63e56e60$6ff8e880@jwcsjw
"Sage La Torra" <sagelt@gmail.com> wrote:
> I've got a design document detailing the first few translations I'll be
> handling, and I'd greatly appreciate feedback and advice.
>
I may be off base here, or in the alternate pointing out a corner case 
that's of little significance, but:

-Compound statements: if($foo eq "a" or $foo eq "b" or $foo eq "c") {...} -> 
if $foo eq "a"|"b"|"c" {...}

Is there an issue if $foo is tied here, in that (unless the a or b condition 
match) $foo will be evaluated three times; for testing against a junction is 
it feasible that the compiler can say "aha, I'll only evaluate $foo once and 
test it three times"?  Reading $foo may have some real world visible effects 
and the semantics would change.  The P6 spec may nail this down, but I 
haven't time to go look (and I'll surely not have time before I forgot this 
thought completely...)

That's all I can pick out from the quick glance I have time for.  Have fun! 
:-)

Jonathan 


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About