From dev-return-4058-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Thu Jan 4 13:44:54 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 40561180657 for ; Thu, 4 Jan 2018 13:44:54 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 303DF160C2B; Thu, 4 Jan 2018 12:44:54 +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 7AB99160C28 for ; Thu, 4 Jan 2018 13:44:53 +0100 (CET) Received: (qmail 8889 invoked by uid 500); 4 Jan 2018 12:44:52 -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 8879 invoked by uid 99); 4 Jan 2018 12:44:52 -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; Thu, 04 Jan 2018 12:44:52 +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 C2F9D1A0977 for ; Thu, 4 Jan 2018 12:44:51 +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 hhCrarV9EqIQ for ; Thu, 4 Jan 2018 12:44:49 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 5D8BD5F295 for ; Thu, 4 Jan 2018 12:44:49 +0000 (UTC) Received: from [192.168.1.3] ([89.12.49.145]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LeeNW-1fFlBW2v7u-00qPDN for ; Thu, 04 Jan 2018 13:44:48 +0100 Subject: Re: [VOTE] Inner-project extension methods To: dev@groovy.apache.org References: <1514692277805-0.post@n5.nabble.com> <1514945068542-0.post@n5.nabble.com> <1515005764260-0.post@n5.nabble.com> From: Jochen Theodorou Message-ID: <7da4e81f-2cbe-45bb-2c3e-e2c335024328@gmx.org> Date: Thu, 4 Jan 2018 13:44:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1515005764260-0.post@n5.nabble.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:BiF071YqD62e3t9Xl4UJyYUr8em5j2hFpcwQkK4zco4u0NewC+K TF7AUoSagAK7CmUkfCL76o20q8yOenwsuPRoqibxKLUnwGpl2md6iFzkhXDvVKBehlTRMdz i1a7/55r0ODtr28cBBKN0eqaiAEzx4OcYsQQRUDvxj+cdspx9g7HVmfZmDtNIBzdTDoISjb V2JYQsbMm3M7LIq78lS9w== X-UI-Out-Filterresults: notjunk:1;V01:K0:QP/Abb7kbzA=:WRyO9HZXxKpxzKoMvnLzGI rFzv/wBONDb4WNS/UY1EwI05x1OXvjJejCJwI5yCznjttJyLjrnHrctKA7jnEu+CBjjt5fJ5r JrAhMz2Mo78XA49h5prfxZLATNHMEhT1bZgEm7xMHA79v7TEIm5shHXA4Yus9gICbFdYvlaLK NQ4WeaIxAUKA2tthRSHeLEnOOk5G019hEEGjsENj8FA9BTwErEht5/pdujez4Wrud8CFk+OXN zNRJkznB6RM3M+fyPmOW0376QesJMWHB/9gloeyZ//hD9Ea5wjwvigIyXD6GY++EMsYc/oO0L QFzVTH+w2/ZZM62hmLJe2Klit5G+I1x2FiuqwP1IqLm/lwXIzzwwWXhtFdLf7tGewIcMhbRUC xSHSTofGfsukzH3dZ44PNHpuWZYpa/0b9IxGtGDBb2V4f84mXahwI23ATCiXDEpu/vqapw7gO n6dR3PKf22mkAVeQasdlAVsOTiE+fC3Lmjb6NbvONte+mqWoXc0n8hb/iNviovjo4B9ij79cD EN8wUps4W+U4q2mKhCGbWXx9p0KLSjeR7ym+5Dl+WKzcuXEFVUsIiS0FQoIrdwO89M840Ec/S DMe1cbZxIt0ejL2VE2qv9awtWN9XRu376SU2w92ha4YpYwph/sBERDXBlgZ/WADaOwqicfE42 eT0JI+oHeMk9ucB9DowrcuT12t1QGx/PUVH38MNHY/hUdAwRRFBGNmf98V2ss6fS/hRxBwiM5 PCDC6s+19fn2MLFLKujtLnVlwWFnIcdkpheWhRuPStHWvm9yJheDN2PUoiWENvWb6BLfQv2x9 egclD7/0KbkMYMumjplJV4rRfzArqPH8RB/tSaiXpcFsZ8kWlI= On 03.01.2018 19:56, Nathan Harvey wrote: > This idea is unrelated to categories. The behavior would be identical to > current extension methods, except you can use them within the same project. > No special importing or scoping required, just as it works currently. just as it works currently is that a service provider like structure is used. As things are already compiled once the dynamic code takes notice of extension methods, this means to me, that there is nothing to do here for normal Groovy. In my opinion we are then more talking about a "bugfix" for the static compiler. > Hopefully that answers most of the questions you have. I don't know about > how it would work with Java 9. equally bad :( > I am personally against an "import extension" strategy because of the > difficulties it would probably introduce for IDEs. Consider you've added a > String extension method, but it's not marked with anything in particular, > because you can just "import extension." If you start typing the method > name, it has no idea which method could be used as an extension. Basically, > there has to be some indicator on the declaring method, which makes "import > extension" useless IMO. the method would still have to be a static method with the this/self parameter being the first one and defining the type. If that is solved for normal extension methods and/or categories, then there should be no problem for the IDE. bye Jochen