Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Will Perl 6 optimize away useless assignments?

by RhetTbull (Curate)
on Sep 03, 2001 at 21:01 UTC ( #109896=note: print w/replies, xml ) Need Help??


in reply to Will Perl 6 optimize away useless assignments?

A problem I see with this is that it's hard for the compiler to know what's a "useless" assignment -- especially with a language as extensible as perl. For example, what if the variable is tied? An assignment that looks useless may do quite a bit. Of course, you could tell the compiler "optimize it away unless it's tied" but there may be other examples where it's hard/impossible to tell. Although I doubt anyone uses perl for embedded work, this sort of thing is definitely an issue for C where a variable might really be a hardware register so an assignment isn't useless at all and is probably necessary. Can anyone think of a perl example other than a tied variable?
  • Comment on Re: Will Perl 6 optimize away useless assignments?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://109896]
help
Chatterbox?
[ambrus]: like when a medieval scientist supposedly proves his priority inventing something by having previously published an anagram of a thousand letters long summary of the invention?
[choroba]: Progress! Nowadays, you can write a Perl script to generate such an anagram!
[GotToBTru]: i like to order my chemicals a-la-carte ambrus ;)

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2016-12-06 13:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (104 votes). Check out past polls.