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

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2018-06-25 19:51 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (128 votes). Check out past polls.