groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédric Champeau <cedric.champ...@gmail.com>
Subject Re: Consider statically typed/compiled as default for Groovy 3.0
Date Fri, 13 Oct 2017 13:14:41 GMT
Wise words, Paul. I would also very much prefer to see progress in the Java
9 area rather than this, or even the parser. It's much more relevant to the
future of Groovy IMHO. Because, as the ticket explains, there's already
ways to enable this feature (even if a bit cumbersome). It's really of that
importance, then a pull request, accepted through a VOTE, would certainly
be the fastest way to get this.

2017-10-13 15:11 GMT+02:00 Paul King <paulk@asert.com.au>:

> I think most committers are also keen on making progress in the directions
> you describe. Not along the lines of watering down Groovy's dynamic
> capabilities but certainly in terms of making Groovy's static nature as
> hassle free as possible to use. Having said that, we have limited
> resources, so we need to prioritise and do a limited numbers of things well
> rather than half do lots of things. Most of us have our own long list of
> technical issues that we think need working on (jdk9 support, new parser,
> bugs we know of in static type checking, many other features we'd like,
> etc.), so if you aren't seeing a lot of traction for this idea, it is
> possibly because we see a big list of things that would be needed to be
> sorted out to do this well and we are weighing up that list with our
> already long todo lists.
>
> Perhaps we wear our technical hats too much and should put on our
> marketing hats a bit more - who knows. All I can suggest to you is that
> Apache Groovy follows the Apache do-ocracy culture. If anyone picks off a
> small piece of the puzzle and advances it forward, it is likely to
> progress. But it's not guaranteed, so you are doing the right thing by
> discussing on the mailing lists. If you still don't get traction, start
> again with a smaller step.
>
> Cheers, Paul.
>
> On Fri, Oct 13, 2017 at 6:30 AM, MG <mgbiz@arscreat.com> wrote:
>
>> blackdrag suggested to move this
>> https://issues.apache.org/jira/browse/GROOVY-8329
>> discussion from Jira to this list, so I am replying here:
>>
>> I agree with Endre Stølsvik: I think Groovy should strengthen its
>> language support for statically compiled use, and I agree it should move
>> towards making statically using it as hassle free as possible.
>>
>> I think Endre has already made some good points why this would be a good
>> idea, so I am just going to add that I am convinced that Groovy would not
>> be at 3% of the languages used after Java, but at > 30% (basically everyone
>> that could freely pick a language for commercial projects besides Java
>> would be using it) if it would fully be the Java++ it in fact is - in my
>> perception what kept it back was the fact that it "is slow" (true > 10
>> years back), that it is just "a script language" (never true afaik) - and
>> that it "is a dynamic language" (no longer true, but...). When I picked
>> Groovy for the project I work on, I did so despite it was dynamic, not
>> because of that (the static Groovy compiler that someone in Russia had
>> built at the time helped in the decision...).
>>
>> Being able to be dynamic in a language is a powerful feature, but one
>> that is needed only in special cases. Otherwise Groovy would already rule
>> the Java world ;-)
>>
>> Being able to have a very simple configscript that qualifies every class
>> with @CompileStatic is great (http://docs.groovy-lang.org/l
>> atest/html/documentation/#_static_compilation_by_default), but it is not
>> simple/easy enough: I agree there should be a "one click" option to turn
>> all of Groovy to using static compilation by default.
>>
>> Some ways to achieve this:
>> # Make a "static Groovy" download available (might just be based on
>> "including" the @CompileStatic configscript above)
>> # Compiler switch
>> # Choose during installation
>> # Express through the Groovy source file extension:
>> ## *.groovy ... use configured default
>> ## *.groovyd ... dynamic
>> ## *.groovys ... static
>> (alternatives: *.groovys, *.sgrv, *.grvs)
>>
>> The last option has the advantage, that everybody can use it easily
>> everwhere (Shell, IDE, ...), but the disadvantage that all the Groovy
>> examples out there use *.groovy, which would again might give the
>> impression to people that Groovy is "mostly a dynamic language". Maybe a
>> combination of people picking the default mode (dynamic/static) at
>> download/install time, with the extension approach would work best.
>> (That the Groovy compiler will try to compile any file with any extension
>> is OK. In that case I would suggest the fallback if the extension is not
>> known is dynamic compilation, for backward compatibility reasons.
>> Configuring extensions to mean dynamic or static compilation would of
>> course also be an option).
>> Or the Groovy compiler could throw if no --static or --dynamic compiler
>> switch was given ? That would force everyone to make a deliberate
>> decision... ;-)
>>
>> Just a quick brainstorming mail, to hopefully get the discussion going,
>> Markus
>>
>>
>>
>

Mime
View raw message