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

Re^4: What's it with Perl Syntax ?!

by ikegami (Pope)
on Feb 20, 2011 at 21:38 UTC ( #889252=note: print w/ replies, xml ) Need Help??


in reply to Re^3: What's it with Perl Syntax ?!
in thread What's it with Perl Syntax ?!

In the same way, an experienced programmer who has never read Perl before in their life might well guess that at the meaning of $#foo when he or she sees for (0..$#foo). He or she knows that "for" clauses generally have starting and ending boundary conditions. 0 looks like a starting condition. ".." is a common symbol for a series in both mathematics and English. By process of elimination $#foo is likely to be the final boundary condition.

If I were to define readability, I'd say it's the measure of ease of doing this is, deducing the function of code from contextual clues.

However the ability to guess at the meaning is not quite the same thing as $#foo having inherent meaning on its own

Correct, but it won't be found on its own, so it's irrelevant to the question of readability as far as I'm concerned.

!@somearray only makes sense once you've got the notion of context determining data type

I believe otherwise.


Comment on Re^4: What's it with Perl Syntax ?!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2014-12-28 06:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (179 votes), past polls