You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by Jochen Theodorou <bl...@gmx.org> on 2015/06/17 15:44:48 UTC

what kind of class should a open block be?

Hi all,

since there are some changes in JDK9 that might get getSimpleName() 
working on our generated closure classes. I was wondering what kind such 
a class should actually be.

If we want getSimpleName() to not to return an empty string, then it 
cannot be an anonymous class. It sure won't be a top-level class. That 
leaves nested/inner classes and local classes. Usually only local and 
anonymous classes have an enclosing method, so I think it should be one 
of those.

If I understand Cedric right, it should be a local class. I think either 
is fine actually. Historically, the inner class information was not very 
reliable, so I think we are pretty open for this one

bye blackdrag

-- 
Jochen "blackdrag" Theodorou
blog: http://blackdragsview.blogspot.com/


Re: what kind of class should a open block be?

Posted by Jochen Theodorou <bl...@gmx.org>.
Am 19.06.2015 16:23, schrieb Owen Rubel:
> Just got done reading through the patch thread. Aren't they supposed to
> put up a 'deprecation' notice PRIOR to making a change like this?

what is getting deprecated?

bye blackdrag

-- 
Jochen "blackdrag" Theodorou
blog: http://blackdragsview.blogspot.com/


Re: what kind of class should a open block be?

Posted by Owen Rubel <or...@gmail.com>.
Just got done reading through the patch thread. Aren't they supposed to put
up a 'deprecation' notice PRIOR to making a change like this?

Owen Rubel
415-971-0976
orubel@gmail.com

On Fri, Jun 19, 2015 at 6:17 AM, Cédric Champeau <ce...@gmail.com>
wrote:

> My point is really that if JDK 9 changes what #getSimpleName returns for
> our closures, that's a breaking change that is not under our control.
> Changing the behavior of Groovy, whatever it is, means that older classes
> will not be compatible with JDK 9, at least for the code in the wild which
> relies on <generated closure>#getSimpleName.
>
> 2015-06-19 15:14 GMT+02:00 Jochen Theodorou <bl...@gmx.org>:
>
>> Am 19.06.2015 07:43, schrieb David Clark:
>>
>>> Is there url you can provide showing the changes in JDK 9 that provide
>>> this new ability?
>>>
>>> I'd like to comment, but I'm unsure of the subject matter. :-[
>>>
>>
>> well in
>> http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-April/032733.html
>> you can find references to the patch. Also JDK-8057919 is a reference for
>> this. The latest EA version has this patch already and can be tried.
>>
>> bye Jochen
>>
>>
>> --
>> Jochen "blackdrag" Theodorou
>> blog: http://blackdragsview.blogspot.com/
>>
>>
>

Re: what kind of class should a open block be?

Posted by Owen Rubel <or...@gmail.com>.
Right it's just extended Java languages that break. So I guess it's not
deprecation so to speak but building in backwards compatibility but thats
not really their problem though. Still... since it would break alot of the
Java ecosphere, one would hope they wouldn't roll it out IMMEDIATELY. Mark
it for inclusion and give people time to fix.


Owen Rubel
415-971-0976
orubel@gmail.com

On Fri, Jun 19, 2015 at 7:59 AM, Jochen Theodorou <bl...@gmx.org> wrote:

> Am 19.06.2015 15:17, schrieb Cédric Champeau:
>
>> My point is really that if JDK 9 changes what #getSimpleName returns for
>> our closures, that's a breaking change that is not under our control.
>> Changing the behavior of Groovy, whatever it is, means that older
>> classes will not be compatible with JDK 9, at least for the code in the
>> wild which relies on <generated closure>#getSimpleName.
>>
>
> I see it much more relaxed since it is only recently, that getSimpleName
> even works and not fails with an exception. For Java classes there is no
> change. So it does not break anything there.
>
> do we even want people depend on that? In the end I would like to be able
> to have some open blocks not as classes at all. And not everything that is
> a subclass of Closure is a open block either.... Just think of curried
> closures and method closures
>
> bye blackdrag
>
> --
> Jochen "blackdrag" Theodorou
> blog: http://blackdragsview.blogspot.com/
>
>

Re: what kind of class should a open block be?

Posted by Jochen Theodorou <bl...@gmx.org>.
Am 19.06.2015 15:17, schrieb Cédric Champeau:
> My point is really that if JDK 9 changes what #getSimpleName returns for
> our closures, that's a breaking change that is not under our control.
> Changing the behavior of Groovy, whatever it is, means that older
> classes will not be compatible with JDK 9, at least for the code in the
> wild which relies on <generated closure>#getSimpleName.

I see it much more relaxed since it is only recently, that getSimpleName 
even works and not fails with an exception. For Java classes there is no 
change. So it does not break anything there.

do we even want people depend on that? In the end I would like to be 
able to have some open blocks not as classes at all. And not everything 
that is a subclass of Closure is a open block either.... Just think of 
curried closures and method closures

bye blackdrag

-- 
Jochen "blackdrag" Theodorou
blog: http://blackdragsview.blogspot.com/


Re: what kind of class should a open block be?

Posted by Cédric Champeau <ce...@gmail.com>.
My point is really that if JDK 9 changes what #getSimpleName returns for
our closures, that's a breaking change that is not under our control.
Changing the behavior of Groovy, whatever it is, means that older classes
will not be compatible with JDK 9, at least for the code in the wild which
relies on <generated closure>#getSimpleName.

2015-06-19 15:14 GMT+02:00 Jochen Theodorou <bl...@gmx.org>:

> Am 19.06.2015 07:43, schrieb David Clark:
>
>> Is there url you can provide showing the changes in JDK 9 that provide
>> this new ability?
>>
>> I'd like to comment, but I'm unsure of the subject matter. :-[
>>
>
> well in
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-April/032733.html
> you can find references to the patch. Also JDK-8057919 is a reference for
> this. The latest EA version has this patch already and can be tried.
>
> bye Jochen
>
>
> --
> Jochen "blackdrag" Theodorou
> blog: http://blackdragsview.blogspot.com/
>
>

Re: what kind of class should a open block be?

Posted by Jochen Theodorou <bl...@gmx.org>.
Am 19.06.2015 07:43, schrieb David Clark:
> Is there url you can provide showing the changes in JDK 9 that provide
> this new ability?
>
> I'd like to comment, but I'm unsure of the subject matter. :-[

well in 
http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-April/032733.html 
you can find references to the patch. Also JDK-8057919 is a reference 
for this. The latest EA version has this patch already and can be tried.

bye Jochen

-- 
Jochen "blackdrag" Theodorou
blog: http://blackdragsview.blogspot.com/


Re: what kind of class should a open block be?

Posted by David Clark <pl...@gmail.com>.
Is there url you can provide showing the changes in JDK 9 that provide 
this new ability?

I'd like to comment, but I'm unsure of the subject matter. :-[

On 06/18/2015 11:24 PM, Jochen Theodorou wrote:
> no one?
>
> Am 17.06.2015 15:44, schrieb Jochen Theodorou:
>> Hi all,
>>
>> since there are some changes in JDK9 that might get getSimpleName()
>> working on our generated closure classes. I was wondering what kind such
>> a class should actually be.
>>
>> If we want getSimpleName() to not to return an empty string, then it
>> cannot be an anonymous class. It sure won't be a top-level class. That
>> leaves nested/inner classes and local classes. Usually only local and
>> anonymous classes have an enclosing method, so I think it should be one
>> of those.
>>
>> If I understand Cedric right, it should be a local class. I think either
>> is fine actually. Historically, the inner class information was not very
>> reliable, so I think we are pretty open for this one
>>
>> bye blackdrag
>>
>
>


Re: what kind of class should a open block be?

Posted by Jochen Theodorou <bl...@gmx.org>.
no one?

Am 17.06.2015 15:44, schrieb Jochen Theodorou:
> Hi all,
>
> since there are some changes in JDK9 that might get getSimpleName()
> working on our generated closure classes. I was wondering what kind such
> a class should actually be.
>
> If we want getSimpleName() to not to return an empty string, then it
> cannot be an anonymous class. It sure won't be a top-level class. That
> leaves nested/inner classes and local classes. Usually only local and
> anonymous classes have an enclosing method, so I think it should be one
> of those.
>
> If I understand Cedric right, it should be a local class. I think either
> is fine actually. Historically, the inner class information was not very
> reliable, so I think we are pretty open for this one
>
> bye blackdrag
>


-- 
Jochen "blackdrag" Theodorou
blog: http://blackdragsview.blogspot.com/