Array literals are weird.

Imperatorn johan_forsberg_86 at hotmail.com
Tue May 4 14:40:21 UTC 2021


On Tuesday, 4 May 2021 at 10:09:59 UTC, Blatnik wrote:
> On Tuesday, 4 May 2021 at 01:59:48 UTC, norm wrote:
>> [...]
>
> Oh that is pretty disappointing...
>
> I actually intuitively tried to do this while I was learning D. 
> So IMO it fits the language perfectly.
>
> It looks like it wasn't merged because Andrei and Walter 
> thought it complicates the language needlessly 
> (https://github.com/dlang/dmd/pull/3615#issuecomment-72397283).
>
> There's still this DIP: 
> https://github.com/dlang/DIPs/blob/master/DIPs/DIP1039.md & 
> https://forum.dlang.org/thread/ucqyqkvaznbxkasvdjpx@forum.dlang.org?page=3.

Would be nice if that DIP got some love. But, that would *still* 
not enable stuff like
```d
auto a = [1,2,3] + [3,2,1]; //[4,4,4]
```

right?


More information about the Digitalmars-d mailing list