3 ms·
Indeed, where the article says: "these features are too advanced to be useful in 99% of the cases" I'm pretty sure when I wrote CLOS for a living (mind you, n
by arethuza 11y ago
Indeed, where the article says:
"these features are too advanced to be useful in 99% of the cases"
I'm pretty sure when I wrote CLOS for a living (mind you, not recently) that I used :before, :around and :after rather more than that - they are a very natural and pretty simple extension to the basic method dispatch mechanism.
- Avshalom 11y agoI mean they are if nothing else a good place to shove sanity-checking/design-by-contract code with out bloating (see: making harder to reason about) the actual method.
- kbenson 11y agoSince ~2009 Perl 5 has had the Moo* ecosystem of modules (Moose, Moo, Mouse) to provide an object system that supports much of this. It was created as a backport of ideas for Perl 6's object system, which was heavily inspired by CLOS and the Smalltalk traits paper (always liberally steal the best ideas!). That is, there's quite a lot of Perl 5 out there that makes extensive use of method modifiers[1] like before, after, around and friends. 1: http://search.cpan.org/dist/Moose/lib/Moose/Manual/MethodModifiers.pod http://search.cpan.org/dist/Moose/lib/Moose/Manual/MethodMod...