3 ms·
> Such as trying to avoid it in C for clean error handling, when there's no reason to avoid that. Dijkstra would clearly disaprove of this use of goto. But he
by bazoom42 4y ago
> Such as trying to avoid it in C for clean error handling, when there's no reason to avoid that.
Dijkstra would clearly disaprove of this use of goto. But he would blame the C language for making it necessary. Languages with structured cleanup (like the using clause in C#) does not need to use gotos for resource cleanup.
Dijkstras argument does not distinguish between short and long gotos or long or short functions. His argument applies to any use of goto.