|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Comment on |
| ( #3333=superdoc: print w/ replies, xml ) | Need Help?? |
|
Hi
I'm meditating if Perl should introduce an explicit keyword size (or count ¹) always return the number of elements of lists and arrays... (length is already taken and scalar is to overloaden) so
and
I know "explicit is better than implicit" is more a Python dogma, but since even popes still fall into the scalar trap we should maybe consider "another way to do it" (best Perl tradition =).
Cheers Rolf PS: I tried to provide an example implementation of size, something like
but was to lazy to fiddle around with prototypes. Anyway IMHO a reliable implementation will need more parsing magic than prototypes can bring to avoid disambiguation. ¹) or whatever
|
|