Basically something like @deprecated, except that it only emits a warning when users subclass the annotated class (and not mereley use it).
That sounds wonderful. There are a *lot* of classes in the standard
library that ought to be final, including around 200 case classes such
as TupleN.
Since any subclass must call the super constructor, one could presumably replace the primary constructor, and deprecate the old one. Sure, it involves potentially creating a constructor that doesn't have the desired signature, but since the class will be made final one release later, one could change it back at that time.
The preliminary name for now is @deprecatedInheritance, but I'm open to suggestions.
It certainly depends on how general the semantics are supposed to be:
Why? I think it should mean "Inheriting from this class (or overriding this method) is deprecated." What it means beyond that is not our concern - it's the province of that project's deprecation policy.
I think this is a really worthwhile feature, I hope the terminological discussion doesn't distract too much. Maybe put the name to a vote?
-0xe1a
Making 2.10 is going to be tough, has to be soon if at all.
What about: @(deprecated @usage), @(deprecated @inheritance) @(deprecated override) with @depreated -> @(deprecated @usage) by default?
Right, well I wish you had brought it up before the *last* milestone release was cut that involves *all* features for both the library and the compiler.
If you want this in, it has to be done before tuesday of next week, most likely unless other critical bugs survive longer or the community build has failures.
In any case, I'd like to entertain the possibility of this feature, but it has to be a clear win-win thing with little chance of issues to make 2.10.x. Guaranteed this kind of thing can make master, but that's not the point, is it?SO, if you thought you had a tight deadline, this is your warning. You're past the deadline already, so sooner is better. Let's get consensus too.
I'm similarly swamped and was unable to get a few things I really wanted in 2.10 as well (*cough* OSGi, *cough*) even with help from others.