Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Unusual (and pointless?) idiom in old code

by TomDLux (Vicar)
on Sep 22, 2011 at 17:24 UTC ( #927421=note: print w/ replies, xml ) Need Help??

in reply to Unusual (and pointless?) idiom in old code

Is this in a loop, eliminating values from the previous iteration? If not, you don't need to assign anything at all. If it IS in a loop, try moving the declaration into the loop, so that once again you don't need to initialize, because limited scope causes the variable to be created, new and empty, once each time around.

I have similar problems, with code written 12 years ago by interns borrowed from the mainframe department and not supervised or peer-reviewed.

As Occam said: Entia non sunt multiplicanda praeter necessitatem.

Comment on Re: Unusual (and pointless?) idiom in old code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://927421]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2015-11-25 21:05 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (691 votes), past polls