I agree, but we're yet to see a constructive and concrete example of when try reduces Go's readbility characteristics
-
-
literally any example where try is used more than once per line. or when try and if err are mixed in the same function. if you don’t think that’s less readable then
but it’s pretty clearly so to a lot of us.
go isn’t rust, what works in one doesn’t necessarily translate1 reply 0 retweets 2 likes -
Replying to @peterbourgon @Ivshti and
There is absolutely nothing wrong with using try more than once per line, or mixing try and if err. Nobody has ever had trouble understanding Rust code that used the equivalents to those features. And yes, our experiences do translate. Why wouldn’t they?
1 reply 0 retweets 0 likes -
Go programmers expect and value that escape analysis is trivial: scan for the return keyword. Other conventions of the language reinforce that: early returns and happy path indent alignment. Languages aren’t interchangeable. Expectations and idioms differ.
1 reply 0 retweets 1 like -
Replying to @peterbourgon @Ivshti and
Same in Rust, before we added ?. Rust users “expected and valued” that returns could be visible by just seeing “return” or “try”. We saw people swear up and down that the language would be ruined when we added ?. Now everyone loves the feature.
1 reply 0 retweets 1 like -
Replying to @pcwalton @peterbourgon and
Like I said, I’ve seen all this before.
1 reply 0 retweets 1 like -
I do t know how else to tell you that you can’t just take a conclusion from one context/dataset and insist it applies equally to another
1 reply 0 retweets 1 like -
Replying to @peterbourgon @Ivshti and
Because nobody has given me a reason why the experiences should be different. All I’ve heard is that Go users care about readability more than Rust users, which is silly.
1 reply 0 retweets 1 like -
Replying to @pcwalton @peterbourgon and
It's clear enough to me that Go and Rust are solving different problems, just based on the language design/complexity/features themselves. This draws different user bases that place different priority on different things. I don't think it can be dismissed as easily as you think.
1 reply 0 retweets 0 likes -
Replying to @ianfoo @peterbourgon and
Read pretty much any RFC thread. Rust users care tremendously about readability.
1 reply 0 retweets 1 like
I think some Gophers’ idea of Rust users as people who don’t care about readability to the same degree is a stereotype, nothing more.
-
-
This is your strawman, not anything anyone has expressed. Readability means different things in different contexts. And it’s pretty unarguable that most Go is easier to grok than most Rust.
1 reply 0 retweets 2 likes -
Replying to @peterbourgon @pcwalton and
I know both Go and Rust. I find it much easier to write readable Rust than Go. Readability means the same thing in every context: how easy it is to understand the code being read. Due to Go's lack of expressiveness, and excessive need for boilerplate, intent is often unclear.
1 reply 0 retweets 2 likes - 1 more reply
New conversation -
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.