Generic parameters for Extension methods
Stephen Colebourne
scolebourne at joda.org
Sun Aug 22 12:57:13 PDT 2010
Looking at Howard's code, I would also expect the generic part to be
after the extension keyword (not that I like the extension keyword).
Stephen
On 22 August 2010 05:50, Howard Lovatt <howard.lovatt at gmail.com> wrote:
> Hi,
>
> The position of a generic parameter for an extension method is
> currently before the context sensitive word extension, e.g.:
>
> <throws E> extension void forEach( Method1<T, T, E> block ) throws E
> default Trait.forEach;
>
> This is odd because extension 'feels' like a qualifier, like public,
> and therefore I expected the syntax to be:
>
> extension <throws E> void forEach( Method1<T, T, E> block ) throws E
> default Trait.forEach;
>
> Any reason?
>
> -- Howard.
>
>
More information about the lambda-dev
mailing list