You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by Martin Grigorov <mg...@apache.org> on 2015/10/16 19:46:47 UTC

Re: isis git commit: ISIS-1213: updating docs for mixins. Also fix for parameter validation

Hi Dan,

On Fri, Oct 16, 2015 at 7:29 PM, <da...@apache.org> wrote:

> +For the case where there is only a single member being contributed, the
> special name "__" (that is, two underscores)
> +can be used instead.  In this case, the contributee member's name will be
> inferred from the mixin's class name.  If the
> +class name itself contains an underscore, then the last part of the class
> name will be used.
>

AFAIK usage of underscore as a prefix in names (and especially two
consecutive underscores) is is kind of deprecated in Java 8 and most
probably won't compile in Java 9.
I think I've seen IDEA 14+ to log compilation warnings when such a detected.

I remember seeing a answer by Brian Goetz somewhere but I cannot find it
now.
Here is an answer in SO: http://stackoverflow.com/a/23525446/497381


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

Re: isis git commit: ISIS-1213: updating docs for mixins. Also fix for parameter validation

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
ok, thanks for that, really useful.

Either will just get rid of the feature, or look for some other special
"reserved" name.  $$ ??

On 16 October 2015 at 19:02, Martin Grigorov <mg...@apache.org> wrote:

> Here is where I've heard of this :
> https://github.com/javaslang/javaslang/issues/242
> The summary is at
> https://github.com/javaslang/javaslang/issues/242#issuecomment-102707841
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Oct 16, 2015 at 7:55 PM, Dan Haywood <dan@haywood-associates.co.uk
> >
> wrote:
>
> > Yes, I saw a message about that, for a single underscore... which is why
> I
> > changed to a double underscore.
> >
> > Do we think that that's a bad idea too?  I kind of like the concept of a
> > "default" name somehow.
> >
> > On 16 October 2015 at 18:46, Martin Grigorov <mg...@apache.org>
> wrote:
> >
> > > Hi Dan,
> > >
> > > On Fri, Oct 16, 2015 at 7:29 PM, <da...@apache.org> wrote:
> > >
> > > > +For the case where there is only a single member being contributed,
> > the
> > > > special name "__" (that is, two underscores)
> > > > +can be used instead.  In this case, the contributee member's name
> will
> > > be
> > > > inferred from the mixin's class name.  If the
> > > > +class name itself contains an underscore, then the last part of the
> > > class
> > > > name will be used.
> > > >
> > >
> > > AFAIK usage of underscore as a prefix in names (and especially two
> > > consecutive underscores) is is kind of deprecated in Java 8 and most
> > > probably won't compile in Java 9.
> > > I think I've seen IDEA 14+ to log compilation warnings when such a
> > > detected.
> > >
> > > I remember seeing a answer by Brian Goetz somewhere but I cannot find
> it
> > > now.
> > > Here is an answer in SO: http://stackoverflow.com/a/23525446/497381
> > >
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> >
>

Re: isis git commit: ISIS-1213: updating docs for mixins. Also fix for parameter validation

Posted by Martin Grigorov <mg...@apache.org>.
Here is where I've heard of this :
https://github.com/javaslang/javaslang/issues/242
The summary is at
https://github.com/javaslang/javaslang/issues/242#issuecomment-102707841

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Oct 16, 2015 at 7:55 PM, Dan Haywood <da...@haywood-associates.co.uk>
wrote:

> Yes, I saw a message about that, for a single underscore... which is why I
> changed to a double underscore.
>
> Do we think that that's a bad idea too?  I kind of like the concept of a
> "default" name somehow.
>
> On 16 October 2015 at 18:46, Martin Grigorov <mg...@apache.org> wrote:
>
> > Hi Dan,
> >
> > On Fri, Oct 16, 2015 at 7:29 PM, <da...@apache.org> wrote:
> >
> > > +For the case where there is only a single member being contributed,
> the
> > > special name "__" (that is, two underscores)
> > > +can be used instead.  In this case, the contributee member's name will
> > be
> > > inferred from the mixin's class name.  If the
> > > +class name itself contains an underscore, then the last part of the
> > class
> > > name will be used.
> > >
> >
> > AFAIK usage of underscore as a prefix in names (and especially two
> > consecutive underscores) is is kind of deprecated in Java 8 and most
> > probably won't compile in Java 9.
> > I think I've seen IDEA 14+ to log compilation warnings when such a
> > detected.
> >
> > I remember seeing a answer by Brian Goetz somewhere but I cannot find it
> > now.
> > Here is an answer in SO: http://stackoverflow.com/a/23525446/497381
> >
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
>

Re: isis git commit: ISIS-1213: updating docs for mixins. Also fix for parameter validation

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Yes, I saw a message about that, for a single underscore... which is why I
changed to a double underscore.

Do we think that that's a bad idea too?  I kind of like the concept of a
"default" name somehow.

On 16 October 2015 at 18:46, Martin Grigorov <mg...@apache.org> wrote:

> Hi Dan,
>
> On Fri, Oct 16, 2015 at 7:29 PM, <da...@apache.org> wrote:
>
> > +For the case where there is only a single member being contributed, the
> > special name "__" (that is, two underscores)
> > +can be used instead.  In this case, the contributee member's name will
> be
> > inferred from the mixin's class name.  If the
> > +class name itself contains an underscore, then the last part of the
> class
> > name will be used.
> >
>
> AFAIK usage of underscore as a prefix in names (and especially two
> consecutive underscores) is is kind of deprecated in Java 8 and most
> probably won't compile in Java 9.
> I think I've seen IDEA 14+ to log compilation warnings when such a
> detected.
>
> I remember seeing a answer by Brian Goetz somewhere but I cannot find it
> now.
> Here is an answer in SO: http://stackoverflow.com/a/23525446/497381
>
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>