Squarism 2017-02-01 17:46:03
beeing only less than a year into haskell land it feels as if records are (constructors with named fields or whatever its called) is a big source of irritation for me. 1. needs to be unique, thus requires awkward names. Lenses api is huge - which also doesnt help. 2. Can use lenses - but lenses syntax works bad with $ expressions so you have to resort to lots of parantheses. 3. neither 1 or 2 is so appealing - for small objects you make do with
Squarism 2017-02-01 17:46:03
anonymous/positional fields - which suck for refactoring.
EvanR 2017-02-01 17:46:40
maybe 2. would be better if you didnt use so much $
Squarism 2017-02-01 17:46:51
ops " Lenses api is huge - which also doesnt help. Should be on point 2.
EvanR 2017-02-01 17:49:27
nshepperd: do you think that sort of phrase means that more often that not, or its a quirk of that one sentence
EvanR 2017-02-01 17:50:08
"if and only if" i guess doesnt require you to care which side of the "and" means which direction
Squarism 2017-02-01 17:52:46
EvanR, i guess - it alot easier on the eye with $ .. $ than (...(...(...) ) )
Squarism 2017-02-01 17:52:52
though
nshepperd 2017-02-01 17:55:20
EvanR: yeah, I would usually intepret "only if" to mean ->
EvanR 2017-02-01 18:06:56
Squarism: no man...
Squarism 2017-02-01 18:07:32
call it personal taste then
EvanR 2017-02-01 18:07:37
instead of f (g (h (u (v (w x))))) you do (f . g . h . u . v . w) x, or dont apply it yet and then theres no parens
EvanR 2017-02-01 18:08:03
thats better than f $ g $ h $ u $ v $ w $ x
EvanR 2017-02-01 18:12:12
in the version with dots, each sub"string" of that chain are valid sub programs, valid expressions you can refactor
EvanR 2017-02-01 18:12:32
with the $'s, mostly the subexpressions are not valid code
EvanR 2017-02-01 18:12:45
i mean, the sub"strings", they arent even valid expressions
EvanR 2017-02-01 18:12:58
the dot version is "decomposable"
Squarism 2017-02-01 18:15:43
EvanR, ok.. i can try that. I guess im changing expressions alot - add pre or post processing of sorts.
EvanR 2017-02-01 18:16:07
right you can add more preprocessing with $'s, but nothing else
EvanR 2017-02-01 18:16:37
i guess you can do anything, but its more work