static array literal syntax request: auto x=[1,2,3]S;
Jonathan M Davis
jmdavisProg at gmx.com
Sun Jun 10 20:23:06 PDT 2012
On Monday, June 11, 2012 05:09:49 Mehrdad wrote:
> On Monday, 11 June 2012 at 03:05:36 UTC, Jonathan M Davis wrote:
> > What are you trying to fix beyond assignments to static arrays
> > with array literals?
>
> Just the fact that it would reduce unnecessary heap allocations.
> I'm not trying to 'fix' it though, as it's not broken. (Then
> again, neither is it right now.)
Well, the unnecessary allocations are eleminated if the compiler starts
eliding them like it should when assigning an array literal to a static array.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list