From users-return-3376-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Wed Mar 21 16:39:20 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 F06F7180651 for ; Wed, 21 Mar 2018 16:39:19 +0100 (CET) Received: (qmail 39752 invoked by uid 500); 21 Mar 2018 15:39:18 -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 39742 invoked by uid 99); 21 Mar 2018 15:39:18 -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, 21 Mar 2018 15:39:18 +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 646A1C0144 for ; Wed, 21 Mar 2018 15:39:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.111 X-Spam-Level: X-Spam-Status: No, score=-0.111 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); domainkeys=fail (1024-bit key) reason="fail (OpenSSL error: data too small for key size)" header.from=Jason.Winnebeck@windstream.com header.d=windstream.com; dkim=pass (1024-bit key) header.d=windstream.com header.b=idJr2Jrr; dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=windstream.onmicrosoft.com header.b=hBbnrno9 Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id X1ZjNmz6PKMV for ; Wed, 21 Mar 2018 15:39:16 +0000 (UTC) Received: from vml905.windstream.com (vml905.windstream.com [173.186.244.142]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 4C97B5F2EE for ; Wed, 21 Mar 2018 15:39:16 +0000 (UTC) Received: from scarcnwap008.windstream.com (scarcnwap008.windstream.com [10.104.100.46]) by vml905.windstream.com (8.15.2/8.14.4) with ESMTP id w2LFd9dJ016051 for ; Wed, 21 Mar 2018 11:39:09 -0400 DomainKey-Signature: a=rsa-sha1; s=mail; d=windstream.com; c=nofws; q=dns; h=dkim-signature:dkim-signature:from:to:subject:date: message-id:accept-language:content-language:x-ms-has-attach: authentication-results:x-originating-ip:x-ms-publictraffictype: x-microsoft-exchange-diagnostics: x-ms-exchange-antispam-srfa-diagnostics: x-ms-office365-filtering-correlation-id:x-microsoft-antispam: x-ms-traffictypediagnostic:x-microsoft-antispam-prvs: x-exchange-antispam-report-test:x-exchange-antispam-report-cfa-test:x-forefront-prvs: x-forefront-antispam-report:received-spf: x-microsoft-antispam-message-info:spamdiagnosticoutput:spamdiagnosticmetadata: content-transfer-encoding: x-ms-exchange-crosstenant-network-message-id: x-ms-exchange-crosstenant-originalarrivaltime: x-ms-exchange-crosstenant-fromentityheader:x-ms-exchange-crosstenant-id: x-ms-exchange-transport-crosstenantheadersstamped:x-organizationheaderspreserved: x-crosspremisesheaderspromoted:x-crosspremisesheadersfiltered:x-originatororgJ DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=windstream.com; s=mail; t=1521646749; bh=lhPVh4vkPCF1QGDGxq6kmKxSByIXrIXfor9cT0LVYE8=; h=From:To:Subject:Date:Message-ID; b=idJr2JrrVQ2KiOffG/xeMelk2/QxvHKFh6KM72Sp4yPv8I9cLaPOWvyA2sWp9UpSH xdIRzsBEElFVmNfNnKWvkKLqRKq6cFP+r3/5qi7UG4LjH/aQtW5R5WdWk4ggoApBKB La8nIkyAVZYcfZQmnGfFDYLivO/PeXeAa5nLcFbs= Received: from pps.filterd (scarcnwap008.windstream.com [127.0.0.1]) by scarcnwap008.windstream.com (8.15.0.59/8.15.0.59) with SMTP id w2LFPW3a043799 for ; Wed, 21 Mar 2018 11:39:09 -0400 Received: from cwwapp461.windstream.com (cwwapp461.windstream.com [10.104.100.213]) by scarcnwap008.windstream.com with ESMTP id 2gtrt8q17s-1 for ; Wed, 21 Mar 2018 11:39:08 -0400 Received: from CWWAPP1018.windstream.com (10.104.88.101) by CWWAPP461.windstream.com (10.104.100.213) with Microsoft SMTP Server (TLS) id 14.3.301.0; Wed, 21 Mar 2018 11:39:08 -0400 Received: from CWWAPP1017.windstream.com (10.104.88.100) by CWWAPP1018.windstream.com (10.104.88.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Wed, 21 Mar 2018 10:39:07 -0500 Received: from CWWAPP1015.windstream.com (10.104.253.50) by CWWAPP1017.windstream.com (10.104.88.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34 via Frontend Transport; Wed, 21 Mar 2018 10:39:07 -0500 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (216.32.181.18) by exchedge.windstream.com (10.104.253.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Wed, 21 Mar 2018 10:37:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windstream.onmicrosoft.com; s=selector1-windstream-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=LjmP3GidqXI/uRkEcW++LsJvcN6lGs0R3Bt9BE8MgYE=; b=hBbnrno9TCZcTyhhzq3NyWFL0ccM0LI1zlHmD6LhGMNhvd6vmhegclGBlp5m5NPgQAkWW7FUVeK9ZPH0Oj+LTJ9q5LxM2E97v4hhY80HD9QQmfJVGPixFm7rPGPta64B6Pu7KksLa4+6qtce83v3dc0cdkH0kQp77JJCuw1bqZM= Received: from CY4PR05MB3448.namprd05.prod.outlook.com (10.171.248.160) by CY4PR05MB3016.namprd05.prod.outlook.com (10.169.184.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.6; Wed, 21 Mar 2018 15:39:06 +0000 Received: from CY4PR05MB3448.namprd05.prod.outlook.com ([fe80::7927:5ffa:480a:8c42]) by CY4PR05MB3448.namprd05.prod.outlook.com ([fe80::7927:5ffa:480a:8c42%6]) with mapi id 15.20.0609.009; Wed, 21 Mar 2018 15:39:06 +0000 From: "Winnebeck, Jason" To: "users@groovy.apache.org" Subject: Groovy 3 lambda, method reference, default methods Thread-Topic: Groovy 3 lambda, method reference, default methods Thread-Index: AdPBJtDPcdQfbeQcQ5yGWVCIAPCFlw== Date: Wed, 21 Mar 2018 15:39:06 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jason.Winnebeck@windstream.com; x-originating-ip: [40.141.236.247] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR05MB3016;7:dKOD+sTVx+VTysNeEb0M8Rk6c8fY7flLnIicKOhqeuBO6x5OJzMMMfdSUsmCFTnC8KhFgvThhghWJntekKKkWVHJjEgwpKM6uSeefYfN6W9bd/BVQS1taSPtZd6aFNsFek7xZTYb0WddnCscFqPUyfUlzUJyfwQvuZP5R8V4kC+2cKpaxNc9JdOQjpFCMEYxBGpFbwB0DaPsjvWR7AmdzYxkXSpwxz3E/CBlhYxW6PxmtVKzvh7OHtDoJu46dWx1 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 951c1d1f-d6a3-4588-72ce-08d58f41e188 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:CY4PR05MB3016; x-ms-traffictypediagnostic: CY4PR05MB3016: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231221)(944501324)(52105095)(6041310)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:CY4PR05MB3016;BCL:0;PCL:0;RULEID:;SRVR:CY4PR05MB3016; x-forefront-prvs: 0618E4E7E1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39380400002)(39860400002)(376002)(366004)(346002)(199004)(189003)(3846002)(966005)(2900100001)(3280700002)(2501003)(5250100002)(66066001)(2351001)(106356001)(316002)(15188555005)(2906002)(305945005)(74316002)(7736002)(86362001)(6116002)(5660300001)(6506007)(53936002)(53376002)(8936002)(33656002)(186003)(55016002)(3660700001)(5640700003)(1730700003)(81156014)(97736004)(8676002)(81166006)(102836004)(59450400001)(25786009)(7696005)(6436002)(6916009)(99286004)(72206003)(478600001)(14454004)(9686003)(6306002)(68736007)(105586002)(26005);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR05MB3016;H:CY4PR05MB3448.namprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: windstream.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: AVfaHTOjJWrAgzCsKCPL81Y2VyxDuhOwmSuA2+X4SRU5CCRd/fRIbxx88KnGp9ltn2k9lQ3eAeWBCJuWR22L39Tl88jKsGSQN5PPK4sqAbXokvxNkS523S2oTiHz8+XevOI2iSJOfJNUJVaHvyjshxphTpUft2US3pH1nn8AWqWyQ5fCngpm1y7ZjJSyvCpmmrRqe3rE42yO/e2jEASLx85vrB9+89sbjihaFNOaBmNu1OXzNFz5zBa+WEV+WWRgSEQmYbuegzdN7PARSGIREeq6kB8bo9BuiO7+8TSsoFnYcSkafGSLh+RUUyicMBJzoRLhQd4eAM7dK+noLDr/oQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 951c1d1f-d6a3-4588-72ce-08d58f41e188 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2018 15:39:06.0143 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 2567b4c1-b0ed-40f5-aee3-58d7c5f3e2b2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR05MB3016 X-OrganizationHeadersPreserved: CY4PR05MB3016.namprd05.prod.outlook.com X-CrossPremisesHeadersPromoted: CWWAPP1015.windstream.com X-CrossPremisesHeadersFiltered: CWWAPP1015.windstream.com X-OriginatorOrg: windstream.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-21_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=447 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803210183 I took a look at the new Groovy 3 changes at http://groovy-lang.org/release= notes/groovy-3.0.html and noticed there is still a question as to whether o= r not to implement lambdas, method references, and default methods as closu= res and traits. Is the Groovy team still taking feedback on these decisions? If so, my vote would be to by default, emit JDK8+ "native" implementations = wherever possible. I would even go as far to say to allow Groovy 3 to emit = JDK8+ lambdas for any expression where a closure inline to a method taking = a SAM, as a way to improve Groovy 2 code, but I can understand why it might= be better to be consistent and have closure blocks always generate closure= s (as closures have delegate concept that extends Java lambdas). The reason for my vote is I work on a large Groovy project where performanc= e is a significant consideration. My experience so far is that using closur= es with streams has poor performance such that any time I want to use strea= ms I either write the class in Java or I make a utility class with the Stre= ams code and call that utility class from Groovy. It is unfortunate that JD= K 8's enhancements make Groovy feel a lot less necessary to me, especially = since I learned how hard it is to avoid BigDecimal math even when using Com= pileStatic. We are working with a business rules system and sometimes a sin= gle rule can trigger 1k+ times within a single page refresh, so we have to = pay attention to which Groovy features we use in certain rules. Avoiding cl= osures, using for in preference to .each, etc., can result in order of magn= itude speedup. That's why my vote is to have Groovy compile static generate= code as close to Java as possible, whenever a choice is possible. Jason Winnebeck This email message and any attachments are for the sole use of the intended= recipient(s). Any unauthorized review, use, disclosure or distribution is = prohibited. If you are not the intended recipient, please contact the sende= r by reply email and destroy all copies of the original message and any att= achments.