Re:Update on await syntax in Rust
by byproxy on Tuesday May 28, 2019 @12:16PM
(#20031552)
Interesting example...I find the first much easier to read and reason about. ¯\_(ツ)_/¯
[ Parent
| on HN ]
Re:Update on await syntax in Rust
by Junk_Collector on Tuesday May 28, 2019 @12:37PM
(#20031765)
I agree with you. I find that in the first example the order of operation is much more explicit at a glance than the second, but I could also get used to the second without much effort. I think it all comes down to what your background is.
It would be nice for both of us to get a brain scan while reading that kind of code, because I find the second immensely more intuitive to parse
I find them completely equivocal. This is the geeky version of the orange/white dress.
Me too but I suspect thats because the first is the pattern used in nearly every language I've spent extended time with since I was a kid (30 years ago).
I don't think either is better but one is definitely familiar.
Generally I try not to care about syntax too much (except putting $ on the front of a variable, that annoys me not so much because they did but because not everyone did so every time I switch from PHP to TypeScript I end up putting $ on at least once a day), the weird part is that I write idiomatic code in both so my brain knows it shifted context but I still put the $.
let $foo = bar;
Just looks wrong.Weirder still when I run into code written by people who do
let $foo = $(foo);
For jQuery stuff (I totally get the reason why).Brains are funny things.