'goto', as an indicator of good language
user1234
user1234 at 12.de
Fri Sep 9 09:16:47 UTC 2022
On Thursday, 8 September 2022 at 16:33:58 UTC, AnimusPEXUS wrote:
> There was a discussion sometime ago in a Russian Dlang Telegram
> chat about 'goto' keyword. And there was some empiric theory,
> stating 'all good languages support goto statement'. Nor Rust,
> nor Carbon, nor Zig will never going to overcome D or C++
> because of this. Language should give possibilities, not take
> them away.
This is what Zig did see
https://github.com/ziglang/zig/issues/630.
I think that the rationale is quite good. Goto solves *almost* no
problem.
> And in some cases, goto able to make code more readable, more
> sane and more understandable. Also, goto is much safer in
> language with GC.
That's a good point.
> [corresponding section in
> wikipedia](https://en.wikipedia.org/wiki/Goto#Criticism)
See also https://wiki.c2.com/?GoodUseOfGoto
More information about the Digitalmars-d
mailing list