From dev-return-5294-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Tue Sep 4 06:49:04 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 91AAB180629 for ; Tue, 4 Sep 2018 06:49:04 +0200 (CEST) Received: (qmail 52674 invoked by uid 500); 4 Sep 2018 04:49:03 -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 52658 invoked by uid 99); 4 Sep 2018 04:49:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2018 04:49:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 93D761809CE for ; Tue, 4 Sep 2018 04:49:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.471 X-Spam-Level: *** X-Spam-Status: No, score=3.471 tagged_above=-999 required=6.31 tests=[FORGED_HOTMAIL_RCVD2=1.187, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.972, URI_HEX=1.313] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id RubG3sqfUHlp for ; Tue, 4 Sep 2018 04:49:01 +0000 (UTC) Received: from n5.nabble.com (n5.nabble.com [162.253.133.81]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 84DB55F1B3 for ; Tue, 4 Sep 2018 04:49:01 +0000 (UTC) Received: from n5.nabble.com (localhost [127.0.0.1]) by n5.nabble.com (Postfix) with ESMTP id F26C288394D9 for ; Mon, 3 Sep 2018 21:49:00 -0700 (MST) Date: Mon, 3 Sep 2018 21:49:00 -0700 (MST) From: Daniel Sun To: dev@groovy.incubator.apache.org Message-ID: <1536036540989-0.post@n5.nabble.com> In-Reply-To: References: Subject: Re: Constructor call short-hand syntax MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Paul, Safe index is only for accessing the elements of collections and object properties, but not for creating instance. The collections and objects may be null, so we designed the "safe" index. To sum up, I vote -1 to support syntax like `Date[time:0]`, the class instance will not be null. Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html