On Sunday, 24 July 2016 at 22:21:51 UTC, ketmar wrote:
On Sunday, 24 July 2016 at 22:13:02 UTC, bitwise wrote:
There is the following, which is clever. But if it came down
to having to do this to bypass @nogc, I simply wouldn't use
@nogc.
that's what i ended up with: not using @nogc. it is pure
parketing thing. for real world using it adds more troubles
than it ever solved (and did it solve at least something?!).
i'd say: "don't bother with @nogc, it is mostly useless."
I don't understand what you mean, saying it's useless.
I intend to do this:
class Script {
@nogc void update(){}
}
class CustomScript : Script {
override void update(){}
}
If I did this, it would act as a safety net, and prevent a lot of
accidental allocations. Keep in mind, "update" is meant to run
30-60 times per second, so allocations would add up extremely
fast.
Bit