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.