On 7 January 2012 21:00, Froglegs <lug...@gmail.com> wrote: > Well games often already integrate scripting languages, generally Lua or > Mono, which are both GC based. But this is for the game logic, not for the > high performance parts of the code. >
Indeed. And this is usually just to mitigate the fact that C++ is so crap at this sort of code. Maybe D will be tolerable, and this breaking out to script won't be necessary? (though I'm dubious) For a GC to be used at the C++/D layer it would need to be > > 1) optional always, D makes it optional but you loose a solid chunk of the > language if you ditch GC, what remains is in some ways inferior to C++(no > escaping lambda without GC, /cry) > 2) no long pauses ever > > I think most game engine stuff will continue to be written without GC, as > it doesn't really add much if what you are after is raw performance. And > C++ does have smart pointers which perform much of what a GC does, but > without the long pauses or non deterministic destruction. > I must generally agree, I expect the GC would offer me basically nothing but nuisance in engine level code. I'm generally shovelling large, strictly controlled buffers which need proper placement/alignment, pool allocation, or allocation from temporal ring buffers and that sort of thing. I don't typically find C/C++ intolerable, or even particularly unpleasant for engine level code as it is, it's the higher level code I'm keen to escape.