3 ms·
> I work without exceptions, and the typical solution is to crash the whole program (using assert) if the parameter is invalid. That's lazy. Why not return via
by omegalulw 5y ago
> I work without exceptions, and the typical solution is to crash the whole program (using assert) if the parameter is invalid.
That's lazy. Why not return via error?
- cyber_kinetist 5y agoIt really depends on the thing you’re making, but for gamedev it is often regarded as good practice to assert on error and crash the whole game, so you can explicitly find those errors right away instead of waiting for it to silently cause more subtle problems down the line.