For whatever reason it seems a fairly pervasive opinion that an additional 3 lines of error handling boilerplate per function call is more readable somehow: https://old.reddit.com/r/golang/comments/c9qj8j/one_of_rusts_designers_on_going_from_explicit/et3bzu7/ …
-
-
Ivo Georgiev Retweeted ✕✕✕✕✕
Ivo Georgiev added,
1 reply 1 retweet 2 likes -
try makes code less readable because it’s (a) nestable and (b) triggers a function exit. other proposals that also reduce SLoC but don’t have these properties (i.e. are keywords) are much better
3 replies 1 retweet 9 likes -
No, that has not been our experience at all. Try is more than clear and readable enough. I confess I have trouble understanding why the experience of Rust is so casually dismissed in these conversations.
3 replies 0 retweets 11 likes -
Replying to @pcwalton @peterbourgon and
It's like... we literally did an experiment to answer the question "does try reduce readability"? The results were clear.
1 reply 0 retweets 13 likes -
Replying to @pcwalton @peterbourgon and
Mine is a loaded opinion (I agree with Peter), but I think drawing comparisons between Go and Rust's readability may not be effective. People who've used Go substantially are likely to think its readability is one of its best features, and it will be defended as such.
3 replies 0 retweets 4 likes -
Replying to @ianfoo @peterbourgon and
You’re effectively saying that Rust users don’t care about readability as much as Go users. That is completely false, as reading almost any RFC will make clear.
1 reply 0 retweets 0 likes -
I’m saying that readability means different things in different co texts (languages). I would further argue that Go readability is much higher than Rust readability, and in no small part to things like the lack of the try/? macro.
1 reply 0 retweets 1 like -
Replying to @peterbourgon @ianfoo and
Now you’re trying to argue that Rust would be more readable without having try or ?. No.
1 reply 0 retweets 0 likes -
I’m explicitly not saying anything about Rust. This has nothing to do with Rust.
1 reply 0 retweets 0 likes
You said Go code is easier to read than Rust code because, in part, Go doesn’t have try or ?. Implying that try/? makes Rust less readable.
-
-
Please start an internet fight with someone else.
0 replies 0 retweets 4 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.