3 ms·
D is garbage collected. So is C#.
by z3phyr 14y ago
D is garbage collected. So is C#.
- dkersten 14y agoLast time I looked, you could turn the D garbage collector off (both completely and temporarily). While Unity uses C#, it still seems to use C/C++ components for graphics and physics and such (going by the libraries it uses internally, anyway) and allows you to call native code if you wish.
- p0nce 14y ago> Last time I looked, you could turn the D garbage collector off (both completely and temporarily). You can, but it's hard to ensure a strict no-allocation policy afterwards (someone did it recently). A moderate amount of allocations each frame is usually ok, and this routinely happens in C++ engines too. In my opinion, it's absolutely possible to make a game with D and GC enabled. It's a bit like not making too much drawcalls in a frame. Eg. for this game I only made one struct pool and that was it: http://www.gamesfrommars.fr/wormhol/ http://www.gamesfrommars.fr/wormhol/
- dkersten 14y agoSure, you can do pool allocations in, eg, Java too.
- zxcdw 14y agoC# sis tied to Microsoft platforms. It's a no-go for anything else. Maybe Rust dethrones C++ one day.
- ygra 14y agoMono? (Which is used in Unity, by the way)
- pjmlp 14y agoThe main problem with Mono is that not the full .NET API is supported by it.
- WayneDB 14y agoThe very small list of unsupported APIs are extraneous and unnecessary in the context of cross-platform code. So, what APIs are you referring to, specifically? http://www.mono-project.com/Compatibility http://www.mono-project.com/Compatibility The big ones are: WCF, WPF, WWF... Guess what the first W in all of those acronyms stand for? Windows. EDIT: It's right there at the top of the page - "Everything in .NET 4.0 except WPF, WWF, and with limited WCF." - I don't see a problem.
- irahul 14y ago> The main problem with Mono is that not the full .NET API is supported by it. http://www.mono-project.com/Compatibility http://www.mono-project.com/Compatibility I don't see how any of the non-implemented features are going to be blockers for a game engine.