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 498AC200BA5 for ; Wed, 19 Oct 2016 13:10:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4676D160AEA; Wed, 19 Oct 2016 11:10:14 +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 8C060160ADE for ; Wed, 19 Oct 2016 13:10:13 +0200 (CEST) Received: (qmail 6453 invoked by uid 500); 19 Oct 2016 11:10:12 -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 6439 invoked by uid 99); 19 Oct 2016 11:10:12 -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; Wed, 19 Oct 2016 11:10:12 +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 E94EFC0595 for ; Wed, 19 Oct 2016 11:10:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.472 X-Spam-Level: *** X-Spam-Status: No, score=3.472 tagged_above=-999 required=6.31 tests=[FORGED_HOTMAIL_RCVD2=1.187, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URI_HEX=1.313] 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 i0Ci6juLHdeB for ; Wed, 19 Oct 2016 11:10:08 +0000 (UTC) Received: from mbob.nabble.com (mbob.nabble.com [162.253.133.15]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E09105F24F for ; Wed, 19 Oct 2016 11:10:07 +0000 (UTC) Received: from static.162.255.23.22.macminivault.com (unknown [162.255.23.22]) by mbob.nabble.com (Postfix) with ESMTP id E97DD3403A50 for ; Wed, 19 Oct 2016 04:03:30 -0700 (PDT) Date: Wed, 19 Oct 2016 04:10:07 -0700 (MST) From: daniel_sun To: dev@groovy.incubator.apache.org Message-ID: <1476875407626-5736201.post@n5.nabble.com> In-Reply-To: <8993BB34-96FC-4BDA-A852-95E03388C542@selskabet.org> References: <5806CC8E.2080308@gmx.org> <1476872589837-5736195.post@n5.nabble.com> <8993BB34-96FC-4BDA-A852-95E03388C542@selskabet.org> Subject: Re: Lambda expression for Groovy 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable archived-at: Wed, 19 Oct 2016 11:10:14 -0000 Hi Jesper, > Be careful with that approach, as it won=E2=80=99t work for static method= s =E2=80=94 > leading to very different semantics for the two languages.=20 '.&' can reference the static methods, here is the sample code: [1, 2, 3].each(Objects.&requireNonNull) > Also, you won=E2=80=99t be able to support constructor references withou= t some > new AST construct, I guess.=20 As you said, '.&' does not support constructors..., the following cod= e is valid in Java, but I have no idea the equivalent in Groovy. GenericsType[]::new Thanks for your reminding :) Cheers, Daniel.Sun -- View this message in context: http://groovy.329449.n5.nabble.com/Lambda-exp= ression-for-Groovy-3-tp5736169p5736201.html Sent from the Groovy Dev mailing list archive at Nabble.com.