On 02/10/2013 03:18 AM, monarch_dodra wrote:
> On Sunday, 10 February 2013 at 09:48:04 UTC, Jos van Uden wrote:
>> auto things = new Thing[10];
>> fill(things, new Thing(5));
> What you did just right there is allocate a *single* thing _instance_
> and then place 10 _references_ to that same thi
On Sunday, 10 February 2013 at 06:14:37 UTC, Simon wrote:
Hi, I'm new to the D programming language. Overall I'm liking
things very much, but I'm still getting the hang of a few
things.
Here's a basic programming pattern: I have a class called Thing,
and while I'm coding I decide I need N Thi
On Sunday, 10 February 2013 at 09:48:04 UTC, Jos van Uden wrote:
On 10-2-2013 7:14, Simon wrote:
Hi, I'm new to the D programming language. Overall I'm liking
things very much, but I'm still getting the hang of a few
things.
Here's a basic programming pattern: I have a class called
Thing,
On 10-2-2013 7:14, Simon wrote:
Hi, I'm new to the D programming language. Overall I'm liking
things very much, but I'm still getting the hang of a few things.
Here's a basic programming pattern: I have a class called Thing,
and while I'm coding I decide I need N Thing instances.
In C++ that's
On Sun, Feb 10, 2013 at 8:40 AM, Simon wrote:
>> auto things = iota(10).map!(i => new Thing(i)).array;
>>
>> Ali
>
>
> It's a shame there isn't any simple syntax for it, but that's some neat and
> flexible code.
Oh, you can easily use a template:
import std.array;
import std.algorithm;
impo
On Sunday, 10 February 2013 at 06:57:42 UTC, Ali Çehreli wrote:
On 02/09/2013 10:52 PM, Ali Çehreli wrote:
> auto things = iota(10).map!(i => new Thing(i))().array;
Actually, without the extra parentheses:
auto things = iota(10).map!(i => new Thing(i)).array;
Ali
It's a shame there is
On 02/09/2013 10:52 PM, Ali Çehreli wrote:
> auto things = iota(10).map!(i => new Thing(i))().array;
Actually, without the extra parentheses:
auto things = iota(10).map!(i => new Thing(i)).array;
Ali
On 02/09/2013 10:14 PM, Simon wrote:
> Hi, I'm new to the D programming language. Overall I'm liking
> things very much, but I'm still getting the hang of a few things.
>
> Here's a basic programming pattern: I have a class called Thing,
> and while I'm coding I decide I need N Thing instances.
>
On Sunday, 10 February 2013 at 06:14:37 UTC, Simon wrote:
Hi, I'm new to the D programming language. Overall I'm liking
things very much, but I'm still getting the hang of a few
things.
Here's a basic programming pattern: I have a class called Thing,
and while I'm coding I decide I need N Thi
Hi, I'm new to the D programming language. Overall I'm liking
things very much, but I'm still getting the hang of a few things.
Here's a basic programming pattern: I have a class called Thing,
and while I'm coding I decide I need N Thing instances.
In C++ that's a matter of
std::vector things(
10 matches
Mail list logo