3 ms·
Thinking in absolutes is never a good idea when it comes to a subjective matter (in this case: code style). goto statements can and sometimes do have good use
by Koffiepoeder 5y ago
Thinking in absolutes is never a good idea when it comes to a subjective matter (in this case: code style).
goto statements can and sometimes do have good use cases, for instance finite state machines and error handling.
It's not because something is generally not a recommended construct that you should never consider using it: in my opinion you should use all the tools you have in your belt and consider each use case separately to determine usefulness, practicality and other criteria applicable to your project.