groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <pa...@asert.com.au>
Subject Re: Proposed @NamedVariant breaking change edge case
Date Tue, 04 Sep 2018 22:25:14 GMT
On Wed, Sep 5, 2018 at 2:56 AM Jochen Theodorou <blackdrag@gmx.org> wrote:

>
>
> Am 04.09.2018 um 10:17 schrieb Paul King:
> [...]
> > Basically, I propose making this (using the GROOVY-8703 example):
> >
> >   @NamedVariant
> >    Color(Integer  r,Integer  g,Integer  b) {
> >      this.r = r;this.g = g;this.b = b
> >    }
> >
> >
> > Be the same as this:
> >
> >   @NamedVariant
> >    Color(@NamedParam Integer r, @NamedParam Integer g, @NamedParam
> Integer b) {
> >
> >      this.r = r;this.g = g;this.b = b
> >    }
>
> reminds me a lot of the code I just saw for the definition of a rest
> endpoint in spring with annotations for about everything.
>
> Can't the usage of @NamedParam imply @NamedVariant?
>

You could do this but currently @NamedParam and @NamedDelegate are marker
interfaces so you'd need a global transform.


> > Given 2.5 has only been out for a few months, I suspect @NamedVariant
> > uptake won't be huge at this point and most probably folks aren't
> relying on
> > the behavior when the additional marker annotations are left off.
> > I propose we change this behavior and list it as a breaking change in
> > the 2.5.3 release notes. If we delay any longer though, I think we will
> need
> > to stick with the current design.
>
> I think we should work more with marking new features as experimental
>

That would have been a great option (in hindsight) here. :-)


>
>   bye Jochen
>

Mime
View raw message