4 ms·
> dramatically reduces the size of the state space that must be reasoned about True > This makes programming significantly easier (especially over the long te
by dataflow 2y ago
> dramatically reduces the size of the state space that must be reasoned about
True
> This makes programming significantly easier (especially over the long term)
Not true. (As in, the implication is not true.)
There are many many factors that affect ease of programming and the structure of the stage space is just one of them.
- tkz1312 2y agoIt’s true that things like docs and error messages are also important, but the fundamental task of understanding and reasoning about code is significantly easier if you restrict yourself to pure functions over immutable data.
- dataflow 2y agoNo, I didn't mean docs and error messages, I meant even more basic things. Like sheer code size, visual noise, and intuitiveness, to give a few examples. There's no free lunch, everything is a tradeoff. Just because you're constraining the program's state space that doesn't imply you're making the code more succinct or intuitive. You could easily be adding a ton of distracting noise or obscuring the core logic with all your awesome static typing.
- tkz1312 2y agoI think the relative importance of syntax compared to actual semantics when it comes to ease of understanding is probably rather low. Either way Haskell is also probably the language that lets you produce the most succinct code of anything that could be reasonably be used in production.
- lemonwaterlime 2y ago> Haskell is also probably the language that lets you produce the most succinct code It is. Haskell has the low verbosity of scripting languages like Ruby and Python while letting you manage applications that would otherwise be written in high verbosity languages like C++, Java, and Rust.