Conway's game of life

gedaiu via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Feb 2 02:41:32 PST 2015


It's true that I have to change that function. Thanks for the 
notice!

Why do you think that D's GC is crap?




On Sunday, 1 February 2015 at 21:54:43 UTC, Foo wrote:
> On Sunday, 1 February 2015 at 21:00:07 UTC, gedaiu wrote:
>> Hi,
>>
>> I implemented Conway's game of life in D. What do you think 
>> that
>> I can improve to this program to take advantage of more D
>> features?
>>
>> https://github.com/gedaiu/Game-Of-Life-D
>>
>> Thanks,
>> Bogdan
>
> For each remove you create a new array. That is lavish. You 
> should use a bool inside the struct Cell. If it's false, the 
> cell is not displayed and is out of the game.
> My suggestion: don't use the D GC, it's crap. Try to circumvent 
> the GC wherever possible. Therefore you should use the -vgc 
> compiler flag and the @nogc attribute.



More information about the Digitalmars-d-learn mailing list