Re:Late Architecture with Functional Programming
by gizmo686 on Sunday April 30, 2023 @09:39PM
(#35768277)
In a sufficiently expressive language, do-notation isn't that important. Consider the following pieces of (equivelent haskell)
Sure, the code for f1 is easier to read, but not by that much. You have a bit more noise in each line with the explicit operators being added. The only big readability difference I see is that you have moved to bound variable to the end of lines instead of the start. I've never actually worked in a codebase that regularly did this, but I suspect you would get used to it frequently. The inconsitency with let statements putting the bound variable on the left would be a readability drawback; but I can easily imagine a language that allows for putting the bound variable on the right hand side of an assignment, such as (not Haskell):
[ Parent
| on HN ]
There are no comments on this comment yet.