From dev-return-4949-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Tue May 29 05:25:37 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 6E9A9180608 for ; Tue, 29 May 2018 05:25:36 +0200 (CEST) Received: (qmail 25417 invoked by uid 500); 29 May 2018 03:25:35 -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 25402 invoked by uid 99); 29 May 2018 03:25:34 -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; Tue, 29 May 2018 03:25:34 +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 AE8761A0427 for ; Tue, 29 May 2018 03:25:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.75 X-Spam-Level: ** X-Spam-Status: No, score=2.75 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, KAM_INFOUSMEBIZ=0.75, RCVD_IN_DNSWL_NONE=-0.0001] 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 vu7oU6AYt9Tc for ; Tue, 29 May 2018 03:25:31 +0000 (UTC) Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id DB8505F24A for ; Tue, 29 May 2018 03:25:30 +0000 (UTC) Received: by mail-oi0-f44.google.com with SMTP id t133-v6so8213854oif.10 for ; Mon, 28 May 2018 20:25:30 -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=ygv8wRXUvV6bk55RJOH5s+RnHixOxkMS87rQVkq9F78=; b=Cu5SYoZ6vayHL1t1YiA9YZ3ENWrgdrDbtfVejZe5Q6w0gQAy6BK6eodkbwv+BQ68dY n1hkHogNI7flsdBPh21Yd88+kc9friUyzMdrYykqENL+yt3PSTZC2NyHA7ShBnl3NH8z l0S0GGQvs2y5rZRj6byarkLeA0s3peVdkjMHIMeAsGrDiGlAYzwWruPhnwNRZOYL9jwY Q8UgczA1ncG7B/2Fq4pay22uAORJNjGpDUAYVyfpxhwcMQKLC1pHqNl7NywuGxtGqmRI W4Yo/Ct2/uvaayouI9cEtdqRg2huEqGD9kQ2tH2ZnscEkz+aDpZjVbBAOGNcgtQGslkZ 2ifA== 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=ygv8wRXUvV6bk55RJOH5s+RnHixOxkMS87rQVkq9F78=; b=BAd1ZYzluhNf4GSvJVGoj7dKwYjFuVlvYPKr8zAAlKST/jnFl9SKtmy4WjgUrp1I9y yQQMe36NHxc7ypkWP9LZrjYZI3SA21EWXBSk+MC1Yb9oUxI0IRYzj6RCJS6kuH5Anuj7 /LJ48DS9QOmGs0R0hPCcbxeqLyv6LoDtp55bW0E2LRYM5daCMbeHmYWMe3peDPUozXvs qGrY05ysBXFjytTVoFrGdc+5+EHj4wa4k4Or+UmhwBTKEaI0kjSmFG83KaAcRq0xVOme YtEw0Szs4qZPsFuCaG3BmQEKaPQ+ZwtRnyiQTNZXna940r2g3N1+DGRh5T/97oaBrG8y D53A== X-Gm-Message-State: ALKqPwd2QH4rv2+GEm4UvxtdbjNFiAqBE1yZJUmkBIzsggt0g8Am+q01 e2VASYMKf34qL1ygHjz4NuXo9rSJ1UHlW1RSxHTVwg== X-Google-Smtp-Source: AB8JxZoOltiH9vjvh86XERkfWC77jKtg6OhQCP8VMtYOCiQzk4LiUujWBeHit8Gyh82oUgjPvrWxLuah+XnHlGOM3fU= X-Received: by 2002:aca:e5ca:: with SMTP id c193-v6mr9247028oih.44.1527564323745; Mon, 28 May 2018 20:25:23 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:a5d1:0:0:0:0:0 with HTTP; Mon, 28 May 2018 20:25:23 -0700 (PDT) Reply-To: paulk@asert.com.au In-Reply-To: <60014F2F-7324-4B52-BA79-2FAFB0FDEE2B@gmail.com> References: <60014F2F-7324-4B52-BA79-2FAFB0FDEE2B@gmail.com> From: Paul King Date: Tue, 29 May 2018 13:25:23 +1000 Message-ID: Subject: Re: Groovy 2.5 CliBuilder article (request for feedback) To: dev@groovy.apache.org Content-Type: multipart/alternative; boundary="000000000000e39151056d4fc852" --000000000000e39151056d4fc852 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 29, 2018 at 9:43 AM, Remko Popma wrote: > Paul, > > I=E2=80=99ll change =E2=80=9Cannotating properties=E2=80=9D to =E2=80=9Ca= nnotating fields=E2=80=9D. > I was suggesting the other way around. Field-like declarations in Groovy without an explicit visibility modifier are properties. That's what your examples show. > About =E2=80=9Cgetter methods for interfaces=E2=80=9D and =E2=80=9Csetter= methods for > implementation classes=E2=80=9D, I need to think about this some more but= the > distinction is important. > > The annotations can be a bit =E2=80=9Cmagic=E2=80=9D for users who don=E2= =80=99t know the details > of what happens under the hood. > > Without clear documentation users may try to use the annotations on the > =E2=80=9Cgetter=E2=80=9D method of an implementation class. > > I=E2=80=99ll try to improve the wording but the analogy with JavaBeans is= actually > helpful rather than confusing, I think. Why do you think this analogy > should be avoided? > Other people may have a different understanding but I normally see setters as the term used for methods like setFoo, setBar, setBaz, etc. So that's exactly what we want it to mean for implementation classes. The setters will be there either explicitly or for all non readonly properties which will have automatic setters. The term "getters" is for methods like getFoo, getBar, getBaz etc. The interfaces you are showing don't have such methods, e.g. help(), users(), remaining(). There aren't setters, just interface methods. Paul. > > Remko > > (Shameless plug) Every java main() method deserves http://picocli.info > > On May 29, 2018, at 4:11, Paul King wrote: > > Looks great! > > Two minor points (and they are possibly flaws that also exist in the > Groovy doco - I haven't checked): > * I wouldn't use the term "getter methods of an interface", I'd just use > "methods of an interface". To avoid confusion with getter methods of > JavaBean style classes. > * I would use "annotating properties or setter methods" rather than > "annotating fields or setter methods" > > Cheers, Paul. > > > On Tue, May 29, 2018 at 3:03 AM, Remko Popma > wrote: > >> All, >> >> I polished the Groovy 2.5 CliBuilder article some more >> (https://github.com/remkop/picocli/wiki/Groovy-2.5-CliBuilder-Renewal ). >> >> Feedback (positive or negative) would be great. >> >> On Tue, May 15, 2018 at 11:40 PM, Remko Popma >> wrote: >> >>> Hi everyone, >>> >>> I finished a first draft of an article on Groovy 2.5 CliBuilder >>> (https://github.com/remkop/picocli/wiki/Groovy-2.5-CliBuilder-Renewal). >>> >>> I plan to publish this on DZone and Java Code Geeks when complete. >>> >>> I'd appreciate your feedback and suggestions for improvement! >>> >>> Remko >>> >> >> > --000000000000e39151056d4fc852 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, May 29, 2018 at 9:43 AM, Remko Popma <remko.popma@gmail.co= m> wrote:
Paul,

I=E2=80=99ll change =E2=80=9Cannotating propertie= s=E2=80=9D to =E2=80=9Cannotating fields=E2=80=9D.=C2=A0

I was suggesting the other way around. Field-like= declarations in Groovy without an explicit visibility modifier are propert= ies. That's what your examples show.
=C2=A0
About =E2=80=9Cgetter methods for= interfaces=E2=80=9D and =E2=80=9Csetter methods for implementation classes= =E2=80=9D, I need to think about this some more but the distinction is impo= rtant.=C2=A0

The annotations can be a bit =E2=80= =9Cmagic=E2=80=9D for users who don=E2=80=99t know the details of what happ= ens under the hood.=C2=A0

Without clear documentat= ion users may try to use the annotations on the =E2=80=9Cgetter=E2=80=9D me= thod of an implementation class.=C2=A0

I=E2=80=99l= l try to improve the wording but the analogy with JavaBeans is actually hel= pful rather than confusing, I think. Why do you think this analogy should b= e avoided?

Other people may hav= e a different understanding but I normally see setters as the term used for= methods like setFoo, setBar, setBaz, etc. So that's exactly what we wa= nt it to mean for implementation classes. The setters will be there either = explicitly or for all non readonly properties which will have automatic set= ters.

The term "getters" is for methods = like getFoo, getBar, getBaz etc. The interfaces you are showing don't h= ave such methods, e.g. help(), users(), remaining(). There aren't sette= rs, just interface methods.

Paul.

=C2=A0

Remko

(Shameless plug) Every java main() method deserves http://picocli.info

On May 29, 2018, at 4:11, Paul King <= ;paulk@asert.com.au= > wrote:

Looks great!

Two minor points (and they are possibly f= laws that also exist in the Groovy doco - I haven't checked):
* I wouldn't use the term "getter methods of an interface", = I'd just use "methods of an interface". To avoid confusion wi= th getter methods of JavaBean style classes.
* I would use "= annotating properties or setter methods" rather than "annotating = fields or setter methods"

Cheers, Paul.
=


On Tue, May 29, 2018 at 3:03 AM, Remko Popma <remko.popma@gmail.co= m> wrote:
=
All,=C2=A0

I polished the Groovy 2.5 CliBuilder ar= ticle some more

Feedback (positive or negative) would be great.

On Tue, May 15, 2018= at 11:40 PM, Remko Popma <remko.popma@gmail.com> wrote:=
Hi everyone,

I finished a first draft of an article on Groovy 2.5 CliBuilder

I= plan to publish this on DZone and Java Code Geeks when complete.

=
I'd appreciate your feedback and suggestions for improvement= !

Re= mko



--000000000000e39151056d4fc852--