in reply to Perl's Bad Ideas
To be honest, I was never to satisfied with scalar @var either, even if it is logical when you get the idea of contexts, and that arrays return the number of elements in scalar context. That was not a given...
I really would like the simple function(s) length(@array) and possibly index_of_last(@array). Possibly with OO-syntax like @array.length(), and most certainly with a better name instead of index_of_last. :) But maybe I am a bit unortodox here, about perl... well, could I have those alternatives as well as something short?
And not to mention that lots of text editor's syntax coloring croak badly on $#var making the rest of the line a comment...
|
|---|