The idea is to make explicit and available to the users what OT/J uses implicitly.
A closest match to this idea is what Qi4j creators do declare an interface for a class and hope that someone else will provide an implementation for the methods declared in the interface.
In Qi4j they do it without extending the language just by listing the interface in the implements section and declaring the class abstract. This has a drawback that the class may miss methods from some other interfaces which it is intended to implement.
Implementing and declaring an interface are different intents and, thus, a dedicated language feature is preferable, for example keyword declares
The typehole can be filled by the compiler, by a class loader (from a library) or by the user via providing a role that implements the declared interface. The latter would probably require deliberating role classes from the teams, but this is a different topic
To avoid possible name clashes, the interfaces used in declares may be required not to overlap.
I'm reluctant regarding this proposal for two reasons:
1) after version 0.8 every language designer is conservative
2) I don't see any necessity for the proposed change
We could easily agree that "declares" is somewhat nicer
than implements for these situations. OTOH, I have an excuse
for using implements: think of other interfaces like Serializable
or Remote, that also don't oblige the developer to add any
implementation but rather advise the compiler (or rmic) to add
specific infrastructure to the class thus marked.
OT/J is not developed on a green field. We try hard to play by
the rules of Java and these rules certainly suggest using
"implements" much more than adding another keyword
- the most expensive addition one can do to a language.
For feeling motivated for the proposed change I would need to
either see something really bad happening that can be avoided
by the change or something really cool being possible if and
only if we accept the change.
Do you have arguments towards either direction? I don't see
them.
Stephan
PS: Perhaps Qi4J would be more in need of this change than
OT/J is (I understand the drawback in their case).
Stephan Herrmann wrote on Sun, 21 February 2010 16:31
...
For feeling motivated for the proposed change I would need to
either see something really bad happening that can be avoided
by the change or something really cool being possible if and
only if we accept the change.
I'll try to find examples of really cool things possible with this feature