Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by ikegami (Patriarch)
on Feb 20, 2011 at 21:38 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-03-29 13:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found