in reply to Re^2: A pair of "mathematical" attributes for arrays?
in thread A pair of "mathematical" attributes for arrays?
Still I fail to see how could it be "bloat": you would only use it if needed and otherwise happily ignore it or even ignore its existence altogether.The point of TIMTOWTDI is to offer different sensible ways to achieve the same goal. I fail to see how your proposition offers something that can be generally used. If we were to add every little feature X or Y dream of, Perl would be called PHP.
Except that hinding the thing in a sub would not make the syntax terribly more elegant...That's just personal taste, but I yet again fail to see how could it not be clearer, since you trade $a[$_] || 0 for a($_). And if you like to think in "mathematical" terms, a sub is much closer to a sequence than an array.
Perl is still useful for fast prototyping, and making the beast unnecessarily slow is what I see as "bloat"If you're so concerned about speed, you shouldn't use Perl arrays to begin with, since they are very wasteful on space. Either make your own "sequence" data structure in XS or use a module that already exists (maybe PDL ?).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: A pair of "mathematical" attributes for arrays?
by blazar (Canon) on Sep 14, 2007 at 13:32 UTC |