Several things have been said above. Summarily, I can reply with
- intuitiveness --- like I said, to a person versed in Perl's concept of context-sensitivity, something like scalar makes sense. But, to my C++-programming boss who simply wanted the length of an array, then looked in perlfunc under length and then asked me, it was a hassle. So, it may be best for a trained Perl programmer, but think from the mind of your boss or your secretary or someone else who just wants something simple and fast and you will see what the most intuitive thing is.
Now of course, the first thing that people say is "RTFM"... and my reply to that is: "the manual is very very big." there are much simpler languages out there. REBOL (a next-generation forth) is nothing but English concepts mapped to simple words.... the length word in REBOL works on all series types --- ports, blocks, strings, etc.But there is no industry acceptance of REBOL. So I write modules like Net::FTP::Common and advocate Quantum::Superpositions which bring Perl use nearer to the readability, succinctness, and ease-of-use of REBOL. And I am developing a parser for REBOL in Perl... then the power of REBOL will be available to Perl developers.
- uniformity/genericity --- you know those generic sorting algorithms that need the length of the data and a generic comparision operator? How easy is this in a non-orthogonal language like Perl?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||