4 ms·
I don't think making your tools happy is a particularly valid reason to code in one style vs another.
by scuff3d 1y ago
I don't think making your tools happy is a particularly valid reason to code in one style vs another.
- xigoi 1y agoLeft-to-right is also much easier to wrap your head around. Just imagine the data going on a conveyor belt with a bunch of machines instead of having to wrangle a nested tree.
- scuff3d 1y agoA not insignificant number of functional languages disagree. You often read functional code from the inside out, which basically means you're reading right to left as you move up function calls. For the record though, "it's more readable" is a much better argument then "LSP mad"
- Philpax 1y agoRight-to-left is equivalent to left-to-right in this regard: you're still reading in one linear direction, as opposed to Python, where you have to read inside-out and revisit later parts of the line to correctly understand previous parts of the line.
- scuff3d 1y agoFair enough. And like I said, you're argument is certainly better than the article's. I'm not really a fan of list comprehensions, I usually just use for loops. It does seem consistent with Pythons syntax though. For loop is `for item in items` and comprehensions have 'item for item in items'.
- xigoi 1y agoNim has a macro in the standard library that allows you to use the actual for loop syntax as a comprehension. let primeSquares = collect: for n in 1..100: if n.isPrime(): n * n
- mrkeen 1y ago(x, y)f;
- PaulHoule 1y agoIf your tools are happy they can make you happy.
- omnicognate 1y agoI have no tools because I've destroyed my tools with my tools.