3 ms·
Interesting example...I find the first much easier to read and reason about. ¯\_(ツ)_/¯
by byproxy 7y ago
Interesting example...I find the first much easier to read and reason about. ¯\_(ツ)_/¯
- Junk_Collector 7y agoI 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.
- jcelerier 7y agoIt 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
- chessturk 7y agoI find them completely equivocal. This is the geeky version of the orange/white dress.
- noir_lord 7y agoMe 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.