Re: Non-Initialized Dynamic Arrays Construction

2014-02-24 Thread TheFlyingFiddle
On Monday, 24 February 2014 at 13:08:52 UTC, Mengu wrote: On Monday, 24 February 2014 at 11:29:39 UTC, bearophile wrote: TheFlyingFiddle: http://dlang.org/phobos/std_array.html#.uninitializedArray is what you want. The OP wants minimallyInitializedArray. uninitializedArray is only for speci

Re: Non-Initialized Dynamic Arrays Construction

2014-02-24 Thread bearophile
Mengu: what's the difference? After you have read the online docs of both function what's your best guess of an answer? Bye, bearophile

Re: Non-Initialized Dynamic Arrays Construction

2014-02-24 Thread Mengu
On Monday, 24 February 2014 at 11:29:39 UTC, bearophile wrote: TheFlyingFiddle: http://dlang.org/phobos/std_array.html#.uninitializedArray is what you want. The OP wants minimallyInitializedArray. uninitializedArray is only for special situations. Perhaps we have to fix the online docs to u

Re: Non-Initialized Dynamic Arrays Construction

2014-02-24 Thread Andrej Mitrovic
On 2/24/14, bearophile wrote: > The OP wants minimallyInitializedArray. uninitializedArray is > only for special situations. There needs to be a ddoc-ed sample demonstrating *exactly* what the difference between minimallyInitializedArray and uninitializedArray is.

Re: Non-Initialized Dynamic Arrays Construction

2014-02-24 Thread Francesco Cattoglio
On Monday, 24 February 2014 at 12:08:31 UTC, Nordlöw wrote: On Monday, 24 February 2014 at 11:29:39 UTC, bearophile wrote: TheFlyingFiddle: http://dlang.org/phobos/std_array.html#.uninitializedArray is what you want. Wouldn't it be nice to have some kind of syntactic sugar for this similar

Re: Non-Initialized Dynamic Arrays Construction

2014-02-24 Thread simendsjo
On 02/24/2014 01:08 PM, "Nordlöw" wrote: On Monday, 24 February 2014 at 11:29:39 UTC, bearophile wrote: TheFlyingFiddle: http://dlang.org/phobos/std_array.html#.uninitializedArray is what you want. Wouldn't it be nice to have some kind of syntactic sugar for this similar to what we have for

Re: Non-Initialized Dynamic Arrays Construction

2014-02-24 Thread Nordlöw
On Monday, 24 February 2014 at 11:29:39 UTC, bearophile wrote: TheFlyingFiddle: http://dlang.org/phobos/std_array.html#.uninitializedArray is what you want. Wouldn't it be nice to have some kind of syntactic sugar for this similar to what we have for static arrays? BTW: Why isn't simply th

Re: Non-Initialized Dynamic Arrays Construction

2014-02-24 Thread bearophile
TheFlyingFiddle: http://dlang.org/phobos/std_array.html#.uninitializedArray is what you want. The OP wants minimallyInitializedArray. uninitializedArray is only for special situations. Perhaps we have to fix the online docs to underline this. Bye, bearophile

Re: Non-Initialized Dynamic Arrays Construction

2014-02-24 Thread TheFlyingFiddle
On Monday, 24 February 2014 at 11:11:44 UTC, Nordlöw wrote: Is it possible void construct a dynamic array such as b in int n = 3; auto b = new float[n]; similar to what we do with static arrays as in int[3] c = void; http://dlang.org/phobos/std_array.html#.uninitializedArray is