Re:Coroutines for Go
by usrbinbash on Tuesday July 18, 2023 @02:40AM
(#36768700)
> One advantage is that it's slightly shorter,
That is not an advantage. That's a slight convenience feature that saves maybe a few seconds every now and then, from the least time-consuming part of programming, which is typing.
The price to pay in the long run for such conveniences is high, as demonstrated in nearly every language which went down that path. Once textbooks start advising against the use of language features because they carry the risk of making the code less legible, a language design has gone down a wrong path.
> people complain about `err != nil` after all.
People complain about many things. People complain about having to wait in line. People complain about taxes. People complain about having to use 2FA. People complain about trees taking up space they would like to have as parking lots for their SUVs.
The fact that people complain about X, doesn't mean X is bad, it doesn't mean X is wrong, it doesn't mean X has to change.
That is not an advantage. That's a slight convenience feature that saves maybe a few seconds every now and then, from the least time-consuming part of programming, which is typing.
The price to pay in the long run for such conveniences is high, as demonstrated in nearly every language which went down that path. Once textbooks start advising against the use of language features because they carry the risk of making the code less legible, a language design has gone down a wrong path.
> people complain about `err != nil` after all.
People complain about many things. People complain about having to wait in line. People complain about taxes. People complain about having to use 2FA. People complain about trees taking up space they would like to have as parking lots for their SUVs.
The fact that people complain about X, doesn't mean X is bad, it doesn't mean X is wrong, it doesn't mean X has to change.