In working with Range a while back, I was frustrated to find that writing a
subclass that wanted to override an accessor (e.g. for $.min and $.max) was
quite difficult because most methods ignored the accessors and called $!min
and $!max or wrote to them directly. If I really wanted to change the
semantics, I pretty much had to re-write or at least wrap every existing
method, which would make my module nigh unmaintainable.

Is this for performance reasons? Would it make sense to try to find a way
to make this easier?

As a concrete example, here's how "elems" is defined on Range:

Aaron Sherman, M.:
P: 617-440-4332 Google Talk, Email and Google Plus:
Toolsmith, developer, gamer and life-long student.

Reply via email to