Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

(Maclir)Re: (dws)Re: Perverse Unreadable Code

by Maclir (Curate)
on Apr 26, 2001 at 10:51 UTC ( #75725=note: print w/ replies, xml ) Need Help??

in reply to (dws)Re: Perverse Unreadable Code
in thread Perverse Unreadable Code

There are advantages in the:

if ( $debug ) { print "About to fetch $url\n"; }
approach, mainly because if I want to throw a few more statements into the "if" block, I can do it simply.

I also find having the code structured that way indicates clearly that a conditional is involved, and by seeing what the condition is, it can often provide an indication of why something is being done. For example:

if ( $account_balance < '100.00' ) { print "Don't pay the loser any interest.\n"; }
indicates we are dealing with low value accounts.

But then again, we are talking subjective matters here. An alternative way, and in my mind just as readible, is:

&calculte_interest($account_number) unless ($account_balance < '100. +00' );

As a side line, I recall being told once "Fortran programmers can write fortran programs in any language."

Comment on (Maclir)Re: (dws)Re: Perverse Unreadable Code
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (21)
As of 2015-11-30 21:08 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 (783 votes), past polls