Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2016-10-25 17:15 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (326 votes). Check out past polls.