From users-return-3491-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Sat May 5 19:23:43 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 9909A180671 for ; Sat, 5 May 2018 19:23:42 +0200 (CEST) Received: (qmail 87008 invoked by uid 500); 5 May 2018 17:23:41 -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 86998 invoked by uid 99); 5 May 2018 17:23:41 -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; Sat, 05 May 2018 17:23:41 +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 B77981A179C for ; Sat, 5 May 2018 17:23:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.701 X-Spam-Level: X-Spam-Status: No, score=-0.701 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=disabled 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 MCA7gXqQP6iu for ; Sat, 5 May 2018 17:23:39 +0000 (UTC) Received: from mx14lb.world4you.com (mx14lb.world4you.com [81.19.149.124]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 847C35FB37 for ; Sat, 5 May 2018 17:23:38 +0000 (UTC) Received: from [84.112.214.51] (helo=[192.168.0.26]) by mx14lb.world4you.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fF0uC-00047g-CB; Sat, 05 May 2018 19:23:32 +0200 Subject: Java-syntax-in-Groovy Warnings To: users@groovy.apache.org, Jochen Theodorou References: <5ae70c72.1c69fb81.f6038.06abSMTPIN_ADDED_MISSING@mx.google.com> <9500b1a9-9fac-7ac8-cbce-17f146d6b470@arscreat.com> From: MG Message-ID: <0cf4ab59-19ef-2701-ece2-3ed992522124@arscreat.com> Date: Sat, 5 May 2018 19:23:31 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-SA-Do-Not-Run: Yes X-AV-Do-Run: Yes Hi Jochen, I have put your concerns about subjective/annoying SPAM warnings (which I share) into the "Warnings in Groovy" issue I created (https://issues.apache.org/jira/browse/GROOVY-8570). Using errors is evidently not possible in this case, and using an external "code style" checking tool would not fulfill my intended purpose due to its non-mandatory nature. The same goes for a Go-like "code formatter tool", for which I think we also do not have the the resources to create it (even though that would be nice). Most importantly: You would never see any of these warnings in any case, because why would you use Java- instead of Groovy-syntax in your code ?-) Cheers, mg On 01.05.2018 17:20, Jochen Theodorou wrote: > On 01.05.2018 16:26, MG wrote: >> I think we should do this, for cases where the rewards of adhering to >> idiomatic Groovy are less obvious or it might be missed that there >> even _is_ an idiomatic Groovy way to do things (I have heard some >> people were not aware that array initialization without "as" was >> supported in Groovy ;-) ). >> Any particular thoughts on how to go about adding such warnings ? > > if people care about my position: > * for me compiler warnings are useless. Either there is a problem, > then it is an error, or there is not, then there is no need for a > warning. C(++) is really bad here and Java also has a bad tradition on > this, that is getting worse. I used to work with gcc for example with > -Wall -Werror, which means to turn on most of the warnings and make > them errors. > * code styling is not the task of the compiler > * I have nothing against an extra tool, that tells people about coding > standards and idiomatic ways, as long as it is not part of the > compiler itself and I am not forced to use it. I really do not > appreciate sonar (nothing against the project really!) for example > telling me about the order of modifiers in my java code, just because > of some obscure readability aspect ;) > * and if you really want things to be aligned, do it like Go and make > a "code formatter tool" (it really has to be more than that), that > changes your code to "idiomatic" usage. > > bye Jochen >