| > That's because you're inexperienced. That's fairly rude to the guy, and doesn't make your point any stronger. I've worked with exceptions before, it leads to try/catch spaghetti code. You can't possibly know instantly all the exceptions to handle for a function (given it calls other functions w/ exceptions), whereas, if it returns a fixed bunch of error codes, then you can know why that specific function failed and handle appropriately. Doesn't help that (language) exceptions typically have awful codegen. There's a reason nobody uses them in game-dev. |
You also can't possibly know all error codes to handle for a function if it calls other functions returning error codes, unless a type system enforces that for you. In which case you should compare to a language where the type system enforces that all exceptions are handled.