4 ms·
I think you're substantially agreeing with the author you've quoted, at least as far as the quote. Expressing distaste for memory-managed languages in game deve
by pekk 12y ago
I think you're substantially agreeing with the author you've quoted, at least as far as the quote. Expressing distaste for memory-managed languages in game development and being able to cite a specific scenario for that is not the same as saying that memory-managed languages are all just bad. I think you, the author and anybody with a modicum of technical maturity can agree that "fast" memory-managed languages are not at an absolute global optimum because they make specific tradeoffs that not everyone will always want to make. Granting this, if we have even one reason to still keep around a memory-managed language (and that's not hard to come up with) then we have a case for keeping multiple languages around and being able to interface among them.
Not everybody realizes this; especially among people who argue about programming languages on web forums, there are still a large number who are still married to the idea that one language has to do everything and if any language has any weakness, we should leave it alone as "bad" because its flaws mean that it is not the Miss Universe of programming languages. It apparently takes some technical maturity to realize that significant flaws are often part of complete packages of tradeoffs that make something a great choice for some contexts even while they are not the best choice for some other context.
- stcredzero 12y agoI think you're substantially agreeing with the author you've quoted, at least as far as the quote. Indeed. The sibling comment to yours is by him.
- m_mueller 12y agoIs there any cross platform language that does it like Objective C w/ ARC? I find that one a pretty good balance between being able to go nitty gritty with optimisations while not having to care about memory management details for the standard use cases. IMO it's also much easier to learn than C++. Could Rust be the answer?
- yoklov 12y agoC++ std::shared_ptr does the same thing as ARC (reference counting based on scope/lifetime). Rust probably has something similar in it's standard library. FWIW I wouldn't use reference counting in game development if I could avoid it, because it has pretty bad performance characteristics as well (the only thing it really has over GC is that it's deterministic, and that, with the exception of in Objective C, you can choose where and where not to use it).
- maccard 12y agoMost games don't do any heap allocations at al during runtime(or at least very very few), so you shouldn't/don't end up with garbage collector pauses during normal gameplay. If you refcount your main structures, they can be auto cleaned up /removed when changing levels/loading scenes/swapping chunks out on the fly.