Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Array indices

by rir (Vicar)
on Sep 14, 2002 at 23:54 UTC ( [id://197953]=note: print w/replies, xml ) Need Help??


in reply to Array indices

... there was a discussion concerning the merits of 0 vs 1 based arrays. There was
something that was said that bothered me -

"if you are good, it doesn't matter if arrays are 0 or 1 based because
you never need to use their index".

If he doesn't need indices, why use an array?

TIMTOWTDI implies that there is more than one valid,
worthy
way to do things. Be unbothered by those that
think otherwise.

Argument from authority, for what it's worth:
"Assignment to $[ is now treated as a compiler directive, and cannot
influence ... any other file. Its use is discouraged."
The Camel 2, p136.

Like you I think arrays have their place. Parallel
arrays may be considered as in core relational tables.
A fairly well respected data type. My use of such, in the
Trying to solve N-Queens thread seems like a fair example.
Update:Minor cleanup, rephrasing.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-23 10:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found