On Oct 11, 2005, at 7:49 PM, Dave Whipp wrote:
Stevan Little wrote:
I would like to propose that class methods do not get inherited
along normal class lines.
One of the things that has annoyed me with Java is that it's class
methods don't inherit (dispatch polymorphically). This means that
you can't apply the "template method" pattern to static (class)
methods. I hope Perl 6 doesn't copy this "feature".
If you would please give a real-world-useful example of this usage of
class-methods, I am sure I could show you, what I believe, is a
better approach that does not use class methods.
As for Java's static methods, they are very different from class
methods in Perl 6. Java's static methods are little more than
functions which have access to other static members. This "feature"
is available in Perl 5 now in the form of subs in a package namespace
and package scoped variables. The fact that Java uses the method call
syntax to access static methods is (IMHO) just an attempt to have
consistency in calling conventions. I say this because (as you
pointed out) they share very little with other methods.