One reason you wouldn't want to is that is Perl's context-sensitivity. By using ArrayList, which would be implemented as a scalar holding a referance, you're now putting things in scalar context that really should be in list context.
BTW--Check out the Class::Iterator module for doing this.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
In reply to Re: Re: Re: Re: Re: Why get() and set() accessor methods are evil
by hardburn
in thread Why get() and set() accessor methods are evil
by synistar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |