Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3C840200D1F for ; Fri, 13 Oct 2017 15:12:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3AD9B160BE5; Fri, 13 Oct 2017 13:12:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 323C21609D1 for ; Fri, 13 Oct 2017 15:12:00 +0200 (CEST) Received: (qmail 8135 invoked by uid 500); 13 Oct 2017 13:11:59 -0000 Mailing-List: contact users-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.apache.org Delivered-To: mailing list users@groovy.apache.org Received: (qmail 8125 invoked by uid 99); 13 Oct 2017 13:11:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Oct 2017 13:11:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 782191A0AF4 for ; Fri, 13 Oct 2017 13:11:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.981 X-Spam-Level: ** X-Spam-Status: No, score=2.981 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=asert-com-au.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id dO3CwRqWJANQ for ; Fri, 13 Oct 2017 13:11:54 +0000 (UTC) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id DABB85FE2F for ; Fri, 13 Oct 2017 13:11:53 +0000 (UTC) Received: by mail-oi0-f46.google.com with SMTP id h200so14219886oib.4 for ; Fri, 13 Oct 2017 06:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asert-com-au.20150623.gappssmtp.com; s=20150623; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to; bh=cLf0jJKHmZko2cJOtsRdQrA3TtL74z84qj0JpVIyJBM=; b=GV3LyWYxtn1wXnclVqlXlfLZ6SIRh0/If6XBv9upi19dDFwDNiy+7lAdYu+P6zE058 kWnvwZomqST4L9BopNXNTOS94vsfXFbNe1Vf190Fm/VjVkDFnqr66AXSziOcbeBm2VNo MsmUKcjjtC6QS7EVJsFrhxQUl9tC/QDORd/QyV7BkqAy5CS6Uj+5zzlZk8Jl3CdqdDg7 fU+TQ0LN/isSYSyTQWs0otSwF+eQZE2mz5rFIGF6z7SnrcEZ/XhLD1hxp3YGjnTyrCaN 9gfm4S5qiWP5eih4Kuy1ql7EVhUjP1fO+bbU6gMhlk+eurizoq0heCR0Ti7QEeCmTMMt bDXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to; bh=cLf0jJKHmZko2cJOtsRdQrA3TtL74z84qj0JpVIyJBM=; b=sVueCmVHz+oLeQfyy8U2Uj4Qfjbc4RdqV+eeV8CwNW03/a4rr2wqGF/lE8dZtWH8wc fA2s+OlCghYQ5LnWBJY6gk/gw53chnkc718q/uzvIIUcfBjTfDkyhOi6LtRUQWMCVrY6 upEnTOI8mGjVYLA1e72FcCOZgdU5rwAeylqxC0WQdM1ev88qBilt98w747Kv1YBwWlI6 NDPbz+wjt6hDN99nz6aJP7Yml4ia1OLvKD1ihIYsH4JVrDIFrjurwGqp5JBag1Lk9Np5 Yktw3gyuNFrTYoSZQxhnjNKD0f4ypVXVkoN0ZuejlD8AoQZMNHA1iPLeRBFGn1zIWUD+ AM1A== X-Gm-Message-State: AMCzsaV4c+rHAuULWqgWib9UdbDh4eVcKUjIYMrlWVvb2IsJiVXTZ1LF eDEdfyUviCl3vJrD5LSoVxGz7Fbv9hAIPbR8T8jeyw== X-Google-Smtp-Source: ABhQp+TGD4C3FjKYeFnvb/sqjdYgyh5ILEk1yesKKocqlcAZ3tpn5I1ySH0rGSIN2I2/bNBMQvMe/nQ9H+SYL3UV2ys= X-Received: by 10.202.49.10 with SMTP id x10mr734065oix.161.1507900312115; Fri, 13 Oct 2017 06:11:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.125.82 with HTTP; Fri, 13 Oct 2017 06:11:51 -0700 (PDT) Reply-To: paulk@asert.com.au In-Reply-To: <741023cb-fa29-284b-be0e-b0f1825b6e81@arscreat.com> References: <741023cb-fa29-284b-be0e-b0f1825b6e81@arscreat.com> From: Paul King Date: Fri, 13 Oct 2017 23:11:51 +1000 Message-ID: Subject: Re: Consider statically typed/compiled as default for Groovy 3.0 To: users@groovy.apache.org Content-Type: multipart/alternative; boundary="001a113cda5075f71d055b6d665d" archived-at: Fri, 13 Oct 2017 13:12:01 -0000 --001a113cda5075f71d055b6d665d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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=C3=B8lsvik: I think Groovy should strengthen its la= nguage > 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 everyo= ne > 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 tha= t > 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 > > > --001a113cda5075f71d055b6d665d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I think most committers are also keen on making progress i= n the directions you describe. Not along the lines of watering down Groovy&= #39;s dynamic capabilities but certainly in terms of making Groovy's st= atic nature as hassle free as possible to use. Having said that, we have li= mited resources, so we need to prioritise and do a limited numbers of thing= s well rather than half do lots of things. Most of us have our own long lis= t of technical issues that we think need working on (jdk9 support, new pars= er, bugs we know of in static type checking, many other features we'd l= ike, 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 alrea= dy long todo lists.

Perhaps we wear our technical hats t= oo 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 cultu= re. 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 t= he right thing by discussing on the mailing lists. If you still don't g= et traction, start again with a smaller step.

Cheer= s, Paul.

On Fri, Oct 13, 2017 at 6:30 AM, MG <= mgbiz@arscreat.com<= /a>> wrote:
blackdrag suggested= to move this
https://issues.apache.org/jira/browse/GROOVY-8= 329
discussion from Jira to this list, so I am replying here:

I agree with Endre St=C3=B8lsvik: I think Groovy should strengthen its lang= uage support for statically compiled use, and I agree it should move toward= s making statically using it as hassle free as possible.

I think Endre has already made some good points why this would be a good id= ea, 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 wou= ld be using it) if it would fully be the Java++ it in fact is - in my perce= ption 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 w= as 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 Ja= va world ;-)

Being able to have a very simple configscript that qualifies every class wi= th @CompileStatic is great (http://docs.groovy-lang.org/latest/html/documentation/#_s= tatic_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 everwhe= re (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 o= f 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 i= s OK. In that case I would suggest the fallback if the extension is not kno= wn 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 swi= tch was given ? That would force everyone to make a deliberate decision... = ;-)

Just a quick brainstorming mail, to hopefully get the discussion going,
Markus



--001a113cda5075f71d055b6d665d--