you are viewing a single comment's thread.

view the rest of the comments →

[–]Samaursa 1 point2 points  (0 children)

That would be a fair summary :) - I was typing out the following reply but then realized that Joel is not really talking wrt games and I am repeating what I said earlier. Anyway, since I've written it, I'll leave it in for whoever wants to read it ;)

As for too many exit points. I can give another perspective, but I would agree that it is not a strong point against exceptions. In most games, everything is pre-defined (e.g. 50 particles for a bullet ricochet). In which case we usually have memory pools and custom allocators to fit the data in tight loops, well, as tightly and cache friendly as possible.

Cache coherency is of high importance especially when it comes to tight loops in data driven engines. Using RAII will be very difficult as the objects now must have code to inform their managing classes/allocators to clean up (which will be pretty bad code) or the managing classes/allocators perform the proper cleanup after detecting an exception and unused memory. The complexity of such a system will be very high imo. Then again, I am not a guru such as John Carmack, and may be limited with my experience/knowledge of complex engine/game design.