develooper Front page | perl.perl5.porters | Postings from July 2010

RE: Order of evaluation of terms (was peephole optimiser could prune more dead code)

Thread Previous | Thread Next
From:
Jan Dubois
Date:
July 15, 2010 12:43
Subject:
RE: Order of evaluation of terms (was peephole optimiser could prune more dead code)
Message ID:
021201cb2456$0bb0e1c0$2312a540$@activestate.com
On Thu, 15 Jul 2010, Jan Dubois wrote:
> On Thu, 15 Jul 2010, David Golden wrote:
> Precedence and associativity are all about how the parser would insert
> parenthesis into an expression to disambiguate its meaning; it does not
> for example change the commutative property of addition: (a + b) has to
> be the same as (b + a), otherwise the operation is no longer an addition.

Please ignore the part about the commutative property. While true, it is
unrelated to the rest of the argument in that post.  Sorry about that.

> And in a() * b() + c() Perl will indeed perform the multiplication before
> evaluating c():

[...]

Cheers,
-Jan


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