groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <blackd...@gmx.org>
Subject Re: Constructor call short-hand syntax
Date Tue, 04 Sep 2018 16:52:31 GMT


Am 04.09.2018 um 06:49 schrieb Daniel Sun:
> 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.

I think you actually miss the point a little. Let me rephrase... should 
we support

somMap?[x:y]

for example. I personally think we can take supporting things like 
x[y:z] and x?[y:z] as future project... if we find a nice use case for this.

bye Jochen

Mime
View raw message