groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MG <mg...@arscreat.com>
Subject Re: [VOTE]Support package scope via `package` keyword
Date Sun, 31 Dec 2017 16:13:53 GMT
Not PMC, of course, but I would vote -1 on the original proposal, based on:

 1. package scope is rare (unless someone proves otherwise ;-) )
 2. Having a keyword and annotation is confusing for users
 3. Dropping the annotation will break existing code (unless no one uses
    the feature), and functionality cannot be simulated by someone who
    depends on this
 4. Keeping the annotation gives no benefit for IDEs (IntelliJ)
    (although, after thinking about this, I feel this is a bit "The need
    of the many outweigh..." in any case)
 5. Giving you a little bit extra (in this case: flexibility with
    regards to package scope granularity) to me typically Groovy, and
    one thing that seperates it from other languages
 6. In Groovy one already uses a lot of annotations in some cases
    anyway, so I do not see the problem with having another one on a
    class for a rare case (I do agree, however, that the frequent case
    should be made as simple as possible in the annotation
    implementation, if possible)

This modified idea I find better, but it still only fixes the 
"functionality cannot be simulated by someone who depends on this" part 
of my arguments above, and introduces the problem that the 
fine-granularity feature of package scope in Groovy gets overlooked 
completely, making it a dead feature.

Cheers,
mg


On 31.12.2017 05:50, Nathan Harvey wrote:
> Perhaps another alternative could be introducing a @Scope annotation to apply
> the scoping behavior used by @PackageScope. Eg @Scope(Modifier.PRIVATE) or
> @Scope(value=PRIVATE, target=[CLASSES]).
>
> I suppose the "package" keyword doesn't indicate the full "package private"
> but I don't think that's necessary. My original point remains that using an
> annotation to declare scope is awkward and cumbersome.
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>


Mime
View raw message