On Thu, Feb 26, 2004 at 07:30:05PM +0100, Robin Berjon wrote: : chromatic wrote: : >With Apocalypse 12 (soon!) : : I'm sorry but this just begs for the question: (vaguely) how soon? :)
Well, here's the rough outline. I still have to do some writing on multiple dispatch, overloading, and delegation, But it's shaping up pretty well. Should be to alpha state within a week or so, depending on how much Real Lifeâ intrudes. Then the sixperl cabal has to hammer on it for a while to remove various intrinsic idiocies. Overview Some of the problems with Perl 5 OO A little too orthogonal Not quite orthogonal enough Forced non-encapsulation A little too minimal Too much keyword reuse Too difficult to capture metadata Inside-out interfaces Not enough convention Wrong conventions Everything possible, but difficult Perl 5 non-problems Generating class by running code at compile time There are many roads to polymorphism People using a class shouldn't have to think hard Trust in convention, but keep your powder dry Classes Philosophy Declaration Traits Use Class name semantics Private classes Methods Philosophy Declaration Use Class methods Class invocant Class|object invocant Submethods Attributes Philosophy Declaration Use Default values Object construction The default constructor CREATE BUILDALL BUILD Eliminating redundancy in constructor calls Object deconstruction DESTROYALL DESTROY Dispatch mechanisms Single dispatch Multiple dispatch next Class, next Role, next Multi last Class, last Role, last Multi DISPATCHALL/DISPATCH CLASSWALK The "multi" modifier Philosophy Declaration Use Overloading method prefix:+ method prefix:? method prefix:~ etc. Delegation Compile-time method $:obj.foo() Run-time method $:obj.*() Relationship to has Relationship to does Naming delegated methods Delegation of handlers through an array @:handlers.*() Anonymous delegation for isa emulation? Class composition with Roles Philosophy declaration Use of Roles at compile time Use of Roles at run time (mixins) Open vs closed classes Collections of classes In classes In modules Versioning Version declarations Use of version and author wildcards Introspection Other non-OO decisions : I get all excited whenever I hear "Perl" and "six" in the same sentence, : and it's building up to be unbearable ;) Yeah, well...it hurts at least as bad on this end. Larry