7 ms·
I'd prefer readability to suffer because the fold over a monad needs something clever that requires a bit of reasoning to understand than because vast amounts o
by HelloNurse 6y ago
I'd prefer readability to suffer because the fold over a monad needs something clever that requires a bit of reasoning to understand than because vast amounts of "readable" boilerplate (for example, trivial getters and setters) hide a needle in a haystack.
- qppo 6y agofolding over a monad (or any other combinator) doesn't require extra reasoning or anything clever, that's the point.
- 1tCKV3QfIo 6y agoIt shouldn't, but it does to people who get discouraged because they aren't having instant success. It's like anything that results in short-term regression convices them it's too complex for them to learn.
- JadeNB 6y agoI think HelloNurse's point was less that a fold is inherently clever or subtle (as you say, it isn't), and more that, if there is something clever or subtle involved, the lesser verbosity of the fold makes it easier to see than would a more familiar, boilerplate-heavy approach in which the clever or subtle point could be lost.
- chrischen 6y agoIt does if you are unfamiliar to the pattern. It probably has more to do with experience with the patterns used rather than readability.
- mattmanser 6y agoMaybe in the 00s, but these days most languages have collapsed boiler plate down massively. This comes across as an old fashioned view (bordering on extremely old-fashioned).
- munk-a 6y agoI haven't seen evidence of reduced getters & setters in my day to day yet - they still seem pretty prevalent when OOP comes into the picture. I'd even say they got a bit worse because now it's excessive getters and setters with gigantic JavaDoc style comments all around them. If I see "@returns id integer The ID" one more time I'll be tempted to throw my monitor out the window.
- csirob 6y ago> If I see "@returns id integer The ID" one more time I'll be tempted to throw my monitor out the window. I honestly believe we're in a dire need for a more up-to-date metaphor that lets us better express our anger at a computer, due to monitors becoming paper thin and lightweight in the past decade or so.
- webmaven 6y ago> > If I see "@returns id integer The ID" one more time I'll be tempted to throw my monitor out the window. > I honestly believe we're in a dire need for a more up-to-date metaphor that lets us express our anger at a computer, due to monitors becoming paper thin and lightweight in the past decade or so. My experience may not be representative, but I believe I have encountered variants of "hurl the keyboard at the monitor" more often than "monitor out the window". OTOH, that phrase doesn't account for laptops.
- csirob 6y ago> OTOH, that phrase doesn't account for laptops. It is also not anger-ready for people working on tablets with rubber keyboards attached.
- panzerklein 6y agoPutting fist through the monitor?
- HelloNurse 6y agoHitting the desk with a fist of moderate force is harmless and rattles lightweight modern computer equipment very satisfactorily.
- deleted 6y ago[deleted]