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

Re: Perl5 -> Perl 6 Translations Design Document

Thread Previous | Thread Next
Jonathan Worthington
June 5, 2006 18:00
Re: Perl5 -> Perl 6 Translations Design Document
Message ID:
"Sage La Torra" <> 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! 


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About