NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Alternate Explanation (Score:1)
I like to think of allomorphism as describing objects or classes that have the same semantics for a set of behaviors but may be unrelated structurally.
Re:Alternate Explanation (Score:1)
Reply to This
Parent
Re:Alternate Explanation (Score:1)
Interfaces in Java are horribly broken, but if you ignore the abominable implementation entirely and reconstruct the problem the Java designers almost tried to solve, you can get close to the idea.
Re:Alternate Explanation (Score:1)
Re:Alternate Explanation (Score:1)
Java interfaces and types have separate namespaces. Thus if you have a closed library from which you cannot inherit or which you cannot modify, you cannot mark a new type as allomorphic (polymorphically equivalent). It's not really generic programming if you have to modify existing code to make it more generic.
Java interfaces also don't provide any default implementation. Whereas roles don't dictate any particular mechanism by which the types achieve their allomorphism, Java interfaces are effectively