JavaDoc for default methods (Was: Re: Request for Review : CR#8004015 : Add interface extends and defaults for basic functional interfaces)
Stephen Colebourne
scolebourne at joda.org
Wed Nov 28 16:25:38 PST 2012
On 27 November 2012 18:36, Brian Goetz <brian.goetz at oracle.com> wrote:
> I think what Stephen meant (and I agree) is that in addition to defining
> the contract for the interface method, there should be a standardized
> place (or at least convention) for implementation notes about the
> default implementation.
>
> For example, the default implementation of List.parallelSort() might in
> fact be a serial sort. While that conforms to the spec ("sort the
> list"), it may well be a crappy implementation, and there should be a
> sensible place to put such information.
Yes, thats what I'm getting at. I don't overly care if it is a form of
words or a Javadoc annotation (or some other idea), so long as it is
easy to identify that the text refers to what the default
implementation does.
Stephen
More information about the lambda-dev
mailing list