4 ms·
People often say that before they realize how complex and messy real-world Haskell looks like. The indentation-based rules aren't even defined anywhere except v
by gooosle 2y ago
People often say that before they realize how complex and messy real-world Haskell looks like. The indentation-based rules aren't even defined anywhere except via imperative code in the implementation.
- brabel 2y agoIf that's true, that's such a disappointment. I always thought of Haskell as the pinnacle of mathematical discipline in programming (though too hard for me to wrap my head around!).
- mjan22640 2y agoSuch a pinnacle would be Agda. Haskell has mathematical holes.
- johnnyjeans 2y agoHaskell is 30 years old at this point. It was pretty cutting edge in the 90s, but the pinnacle has climbed ever higher.
- worksonmymach 2y agoOh sir we call that "operational semantics"
- yazzku 2y agoYou have earned your Martini.
- _flux 2y agoHmm, isn't this the definition? 10.3 of https://www.haskell.org/onlinereport/haskell2010/haskellch10.html https://www.haskell.org/onlinereport/haskell2010/haskellch10... > The effect of layout is specified in this section by describing how to add braces and semicolons to a laid-out program. I wasn't going to actually read that in detail to see if it makes any sense, though, but it looks very detailed :).
- pyrale 2y agoNothing forces it to be messy. A well-tended haskell codebase is great. On the oposite, I would say that a poor haskell codebase is painful, but far from being as painful as a poor java/js codebase. Anecdotally, in my years of haskell at separate places, I had to debug/repl maybe had to repl once or twice. I wish I could say that of mycurrent java gig.
- tome 2y agoMy experience is similar, and in addition I would say that I have come across badly written, difficult to understand Haskell code, but it was always straightforward to refactor it into something clearly written.
- elbear 2y agoI've written Haskell code in production and I still find the syntax the most eloquent. And you don't have to know the indentation rules, you just pick them up from usage. Just like you don't have to know the grammar rules.
- johnnyjeans 2y agoThat's because real-world Haskell tends to not be idiomatic, and it involves a lot of directly telling GHC what to do. Mathematicians don't have to (and rarely, if ever) make efficient code. GHC is a really advanced and impressive compiler, but that really doesn't amount to much. At some point the language just devolves into understanding what arcane compiler internals you need to invoke, and it's more like a bunch of C macros with a fancy runtime.
- yoyohello13 2y agoMaybe it's because I code Python professionally, or because I use an autoformatter (ormolu) for Haskell, but I have literally never had an issue with the indentation rules.