... 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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.