groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mr Andersson <mr.andersson....@gmail.com>
Subject Re: Is it possible to enable CompileStatic for an entire project
Date Wed, 22 Jun 2016 12:26:16 GMT


On 06/22/2016 01:12 PM, Jochen Theodorou wrote:
>
>
> On 22.06.2016 09:59, Thibault Kruse wrote:
>> I don't think the dynamic nature of Groovy is in general regarded as
>> the weakest point of Groovy right now. However, I believe a fully
>> static Groovy may still be preferrable than the dynamic Groovy, mostly
>> from the point of view of maintaining and extending Groovy in the
>> future, without financial sponsoring.
>
> I actually don't get that... financial sponsoring is related to bug 
> fixing and new features. How is it related to static typing vs. 
> dynamic typing. Yes, there are bugs, but the static side has surely 
> more generics bugs, than the dynamic side. Implementation wise you 
> move from the runtime to the compiler, but the complexity is imho 
> higher in the compiler, because the abstraction level higher and at 
> the same time the detail work is more. So this would for me actually 
> speak against the static one if I came from that direction.
>
> If you did actually did mean support... there are several companies 
> that are happy to give Groovy support if you pay them.
>
>> I would also be wary of shipping more variants of Groovy, the question
>> to me is whether Groovy should just drop runtime dynamics. It would
>> kind of stop being Groovy, but it might still be great.
>
> what we wanted to do is a library you can use instead of the groovy 
> jar, if you do only static compilation. Ideally you would have the 
> static base library and the dynamic part on top. But this is a lot of 
> work with not enough work force right now. And it is not clear if that 
> can even be done.

Jochen, but if do try to enable a static groovy flag, similar to the one 
used in the config file, does that mean that all of groovy, even it's 
own internals has to be static?

I am not saying that, only that my uncompiled code has to be static. As 
if it has the annotation on.

A global flag might be problematic for relying on external libraries, 
but if they are already compiled then that should not be an issue.

But if it is, Cedrics idea of another file ending, such as .sgroovy or 
.groovys  ... could provide an easy add for adding @CompileStatic to all 
those classes. It should be fairly easy and I can live with that. 
Intellij will eventually support that kind of filetype and understand it 
is @CompileStatic. Otherwise, a plugin for that should be fairly easy to 
write.



>
> bye Jochen


Mime
View raw message