Thread overview
[Issue 13797] std.array.extend
Mar 31, 2018
Seb
Dec 17, 2022
Iain Buclaw
March 31, 2018
https://issues.dlang.org/show_bug.cgi?id=13797

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunny12@gmail.com

--- Comment #1 from Seb <greensunny12@gmail.com> ---
Hmm. Why can't we handle this on a language level?

---
int[] arr;
arr ~= [0, 1, 2];
---

works fine. So I don't see any reason why the compiler couldn't be improved to accept this too:

---
int[] arr;
arr ~= 3.iota;
---

Custom data types can already do this with operator overloading, but built-in arrays can't.

I submitted an enhancement request: https://issues.dlang.org/show_bug.cgi?id=18699

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=13797

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
December 01
https://issues.dlang.org/show_bug.cgi?id=13797

--- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/9647

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--