Does the average class need to have complete freedom to separate instantiation representation from the class?
As an implementor, I answer wholeheartedly yes.
The naïve implementation of an object system in Perl 5 (stolen almost whole cloth from Python) actively presentsprevents many simple and nearly all clever optimizations. Decoupling representation from behavior at the class or metaclass layer would allow gradual and progressive optimizations for memory usage or compatibility with C data structures or persistence mechanisms or JIT with much less work (and much, much less cleverness) than doing so with the simple hash-based lookup mechanism currently in place in Perl 5.
In the Moose API, compatibility with existing classes is probably more of a concern.
In reply to Re^3: Some thoughts on Moose Attributes
by chromatic
in thread Some thoughts on Moose Attributes
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |