3 ms·
Is point free that weird? JS pipes are in the proposition process. Data → Process → Process → Process Is the above unclear?
by threatofrain 4y ago
Is point free that weird? JS pipes are in the proposition process.
Data → Process → Process → Process
Is the above unclear?
- kqr 4y agoNot in simple cases. It can get weird very quick though. If I didn't know the intuition behind `(.) . (.)` I would have trouble deciphering it mentally, and would have to derive it with pencil and paper.
- klodolph 4y agoThat’s not really what I’m referring to. There’s actually a tool in Haskell that can rewrite code into a points free style, and it can handle much more complicated cases than just simple composition, it can handle multiple uses of a variable, it can eliminate multiple variables, etc. you can create some real incomprehensible stuff this way. Edit: Here's a Haskell wiki article: https://wiki.haskell.org/Pointfree https://wiki.haskell.org/Pointfree > Point-free style can (clearly) lead to Obfuscation when used unwisely. As higher-order functions are chained together, it can become harder to mentally infer the types of expressions. The mental cues to an expression's type (explicit function arguments, and the number of arguments) go missing. > Point-free style often times leads to code which is difficult to modify. A function written in a pointfree style may have to be radically changed to make minor changes in functionality. This is because the function becomes more complicated than a composition of lambdas and other functions, and compositions must be changed to application for a pointful function. > Perhaps these are why pointfree style is sometimes (often?) referred to as pointless style. I have observed some relatively extreme examples of pointfree in the wild, and that's what I'm referring to.