Re: Package specific syntax

2017-12-13 Thread MG
Why is a keyword better than an annotation from an IDE developer's 
perspective (considering Groovy already has tons of annotations which 
more complex semantics than @PackageScope) ?



On 13.12.2017 23:14, Daniil Ovchinnikov wrote:

This is the best way from IDE perspective.

—

Daniil Ovchinnikov
JetBrains
jetbrains.com 
“Drive to develop"

On 14 Dec 2017, at 01:03, Nathan Harvey > wrote:


In Java,  methods and fields use package scope by default. In Groovy, 
they

use public. In order to make something package scope, you have to use the
@PackageScope annotation. This makes code look a bit messy but also 
doesn't
seem very intuitive. What if the "package" keyword was able to be 
applied,

in exactly the same way as "public" and "private" are?

Example:
package void foo() {}



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html






Re: Package specific syntax

2017-12-13 Thread Daniil Ovchinnikov
This: 

> Example:
> package void foo() {}

—

Daniil Ovchinnikov
JetBrains
jetbrains.com
“Drive to develop"

> On 14 Dec 2017, at 01:37, Nathan Harvey  wrote:
> 
> I meant that the @PackageScope annotation made code look somewhat unreadable,
> and that the "package" keyword would be an ideal solution.
> 
> 
> 
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html



Re: Package specific syntax

2017-12-13 Thread Nathan Harvey
I meant that the @PackageScope annotation made code look somewhat unreadable,
and that the "package" keyword would be an ideal solution.



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html


Re: Package specific syntax

2017-12-13 Thread mg
"this" in this case being bound to ?-)(i.e. what do you mean by "this" - having 
a package keyword or an annotation ?)
 Ursprüngliche Nachricht Von: Daniil Ovchinnikov 
 Datum: 13.12.17  23:14  (GMT+01:00) An: 
dev@groovy.apache.org Betreff: Re: Package specific syntax 
This is the best way from IDE perspective.


—

Daniil Ovchinnikov
JetBrains
jetbrains.com
“Drive to develop"


On 14 Dec 2017, at 01:03, Nathan Harvey  wrote:
In Java,  methods and fields use package scope by default. In Groovy, they
use public. In order to make something package scope, you have to use the
@PackageScope annotation. This makes code look a bit messy but also doesn't
seem very intuitive. What if the "package" keyword was able to be applied,
in exactly the same way as "public" and "private" are? 

Example:
package void foo() {}



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html



Re: Package specific syntax

2017-12-13 Thread Daniil Ovchinnikov
This is the best way from IDE perspective.

—

Daniil Ovchinnikov
JetBrains
jetbrains.com
“Drive to develop"

> On 14 Dec 2017, at 01:03, Nathan Harvey  wrote:
> 
> In Java,  methods and fields use package scope by default. In Groovy, they
> use public. In order to make something package scope, you have to use the
> @PackageScope annotation. This makes code look a bit messy but also doesn't
> seem very intuitive. What if the "package" keyword was able to be applied,
> in exactly the same way as "public" and "private" are? 
> 
> Example:
> package void foo() {}
> 
> 
> 
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html



Extension method upgrades

2017-12-13 Thread Nathan Harvey
Extension methods are a very powerful feature in Groovy, but they are also
difficult (and somewhat tedious) to use because they require being in
another project. I believe one reason for this limitation is the syntax of
extension methods, which are exactly the same as other methods, and so they
need to be specified as being different.

Either way, I think a huge improvement would be allowing extension methods
from within other classes on the classpath (ie not in an external
dependency). The synax for delcaring an extension method would be that of
Kotlin and other languages, for example:

public String String.upper() { 
   return this.toUpperCase() // "this" is bound
}

Another option would be to still have a parameter, if the "this" binding is
too confusing:

public String String.upper(String self) { ... }

Thoughts on adding these capabilities?



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html


Package specific syntax

2017-12-13 Thread Nathan Harvey
In Java,  methods and fields use package scope by default. In Groovy, they
use public. In order to make something package scope, you have to use the
@PackageScope annotation. This makes code look a bit messy but also doesn't
seem very intuitive. What if the "package" keyword was able to be applied,
in exactly the same way as "public" and "private" are? 

Example:
package void foo() {}



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html


RE: Gradle build updates

2017-12-13 Thread eric.milles
So is it still possible to produce the groovy-all.jar and 
groovy-all-sources.jar from the SDK zip?


Re: Gradle build updates

2017-12-13 Thread Cédric Champeau
Fixed, thanks for reporting.


> In addition, Groovy Version can not be shown properly(Groovy Version:
> #ImplementationVersion#):
>
> C:\Users\Daniel>groovy -v
> Groovy Version: #ImplementationVersion# JVM: 1.8.0_121 Vendor: Oracle
> Corporation OS: Windows 10
>
>
> Cheers,
> Daniel.Sun
>
>
>
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>