From dev-return-5112-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Sun Jul 22 04:10:12 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 0B848180634 for ; Sun, 22 Jul 2018 04:10:11 +0200 (CEST) Received: (qmail 33779 invoked by uid 500); 22 Jul 2018 02:10:11 -0000 Mailing-List: contact dev-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list dev@groovy.apache.org Received: (qmail 33769 invoked by uid 99); 22 Jul 2018 02:10:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Jul 2018 02:10:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E1E38C051D for ; Sun, 22 Jul 2018 02:10:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.298 X-Spam-Level: * X-Spam-Status: No, score=1.298 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id uzmF239oHYTc for ; Sun, 22 Jul 2018 02:10:07 +0000 (UTC) Received: from mx09lb.world4you.com (mx09lb.world4you.com [81.19.149.119]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 875F45F17B for ; Sun, 22 Jul 2018 02:10:07 +0000 (UTC) Received: from [84.112.214.51] (helo=[192.168.0.28]) by mx09lb.world4you.com with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.84_2) (envelope-from ) id 1fh3ot-0002Io-Kv; Sun, 22 Jul 2018 04:09:59 +0200 Subject: Re: fin To: dev@groovy.apache.org, "J. David Beutel" References: <1291b3a4-9204-d311-f005-bd2f32aae959@arscreat.com> <5B53BBD0.8080909@getsu.com> From: MG Message-ID: <2cc4f45d-e7fd-e67c-fd46-ec6ed0306624@arscreat.com> Date: Sun, 22 Jul 2018 04:09:58 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <5B53BBD0.8080909@getsu.com> Content-Type: multipart/alternative; boundary="------------4CAC9E4B4D5DD3B98ABA00C2" Content-Language: en-US X-SA-Do-Not-Run: Yes X-AV-Do-Run: Yes X-SA-Exim-Connect-IP: 84.112.214.51 X-SA-Exim-Mail-From: mgbiz@arscreat.com X-SA-Exim-Scanned: No (on mx09lb.world4you.com); SAEximRunCond expanded to false This is a multi-part message in MIME format. --------------4CAC9E4B4D5DD3B98ABA00C2 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi 219, I don't quite get that argument: 1. People who don't know Groovy also don't know "def", so they ould just pick up "fin" at the same time as "def". 2. They also don't know you can write "final" instead of "def" in Groovy (as someone pointed out before, "final" is solely a modifier in Java, and cannot be used as a type, as in Groovy). 3. I don't see any examples usinf "final" now, so all new examples could use "fin". Cheers, mg On 22.07.2018 01:03, J. David Beutel wrote: > Personally, I don't think that having the "fin" keyword alternative > would be good.  I think it would discourage usage, as examples get > split between "fin" and "final", and people don't already know what > "fin" means. > > Cheers, > 11011011 > > On 07/21/2018 11:50 AM, MG wrote: >> Hi guys, >> >> I have been wondering for a while whether Groovy developers use "def" >> even if a variable is actually is "final" not only because every >> Groovy example code uses "def", but also because "final" as a word is >> longer than "def". >> Therefore I propose to introduce the shortcut "fin" for "final" in >> Groovy. >> >> e.g. to support >> >> class Goo { >>     fin String name >>     fin Goo gooParent >>     Goo(fin String name, fin Goo gooParent) { ... } >>     String gooGoal(fin x) { >>         fin y = 2*x >>         fin int z = x + y >>     } >> } >> >> Cheers, >> mg >> >> >> > > --------------4CAC9E4B4D5DD3B98ABA00C2 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Hi 219,

I don't quite get that argument:
  1. People who don't know Groovy also don't know "def", so they ould just pick up "fin" at the same time as "def".
  2. They also don't know you can write "final" instead of "def" in Groovy (as someone pointed out before, "final" is solely a modifier in Java, and cannot be used as a type, as in Groovy).
  3. I don't see any examples usinf "final" now, so all new examples could use "fin".
Cheers,
mg


On 22.07.2018 01:03, J. David Beutel wrote:
Personally, I don't think that having the "fin" keyword alternative would be good.  I think it would discourage usage, as examples get split between "fin" and "final", and people don't already know what "fin" means.

Cheers,
11011011

On 07/21/2018 11:50 AM, MG wrote:
Hi guys,

I have been wondering for a while whether Groovy developers use "def" even if a variable is actually is "final" not only because every Groovy example code uses "def", but also because "final" as a word is longer than "def".
Therefore I propose to introduce the shortcut "fin" for "final" in Groovy.

e.g. to support

class Goo {
    fin String name
    fin Goo gooParent
    Goo(fin String name, fin Goo gooParent) { ... }
    String gooGoal(fin x) {
        fin y = 2*x
        fin int z = x + y
    }
}

Cheers,
mg






--------------4CAC9E4B4D5DD3B98ABA00C2--