Difference between revisions of "Talk:Implicit class"

 
Line 7: Line 7:
 
So perhaps rather than inheriting from <e>STRING</e>, you provide a deferred feature definition, and the object test passes if the tested object posseses a feature that matches the name, signature an contract.
 
So perhaps rather than inheriting from <e>STRING</e>, you provide a deferred feature definition, and the object test passes if the tested object posseses a feature that matches the name, signature an contract.
 
--[[User:Colin-adams|Colin-adams]] 10:03, 3 October 2007 (CEST)
 
--[[User:Colin-adams|Colin-adams]] 10:03, 3 October 2007 (CEST)
 +
 +
I edited the page to include only one idea.  The main reason I requested comments on the first idea was so that multiple conformance could be used in actual generic parameters and to clean up multiple conformance.

Revision as of 12:21, 3 October 2007

When you say downcast, presumably you mean an object test (as assignment attempt has been dropped from ECMA)?

So your second case is equivalent to saying that an object test for a STRING_EXTRA always succeeds if the actual object is a STRING.

Your example only makes use of the feature `count' from STRING, and so all that is actually needed is that the object concerned has a feature count: INTEGER.

So perhaps rather than inheriting from STRING, you provide a deferred feature definition, and the object test passes if the tested object posseses a feature that matches the name, signature an contract. --Colin-adams 10:03, 3 October 2007 (CEST)

I edited the page to include only one idea. The main reason I requested comments on the first idea was so that multiple conformance could be used in actual generic parameters and to clean up multiple conformance.