News for hackers. Stuff that matters.
Re:8 months of OCaml after 8 years of Haskell in production ... by gooosle on Tuesday December 03, 2024 @12:09AM (#42303221)
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.
Re:8 months of OCaml after 8 years of Haskell in production ... by brabel on Tuesday December 03, 2024 @02:06AM (#42303662)
If 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!).
Re:8 months of OCaml after 8 years of Haskell in production ... by mjan22640 on Tuesday December 03, 2024 @03:28AM (#42304095)
Such a pinnacle would be Agda. Haskell has mathematical holes.
Re:8 months of OCaml after 8 years of Haskell in production ... by johnnyjeans on Tuesday December 03, 2024 @01:25PM (#42309416)
Haskell is 30 years old at this point. It was pretty cutting edge in the 90s, but the pinnacle has climbed ever higher.
Re:8 months of OCaml after 8 years of Haskell in production ... by worksonmymach on Tuesday December 03, 2024 @02:17AM (#42303715)
Oh sir we call that "operational semantics"
Re:8 months of OCaml after 8 years of Haskell in production ... by yazzku on Tuesday December 03, 2024 @09:25PM (#42313949)
You have earned your Martini.
Re:8 months of OCaml after 8 years of Haskell in production ... by _flux on Tuesday December 03, 2024 @02:57AM (#42303915)
Hmm, isn't this the definition? 10.3 of 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 :).

Re:8 months of OCaml after 8 years of Haskell in production ... by pyrale on Tuesday December 03, 2024 @03:17AM (#42304029)
Nothing 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.

Re:8 months of OCaml after 8 years of Haskell in production ... by tome on Tuesday December 03, 2024 @07:06AM (#42305286)
My 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.
Re:8 months of OCaml after 8 years of Haskell in production ... by elbear on Tuesday December 03, 2024 @03:20AM (#42304048)
I'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.
Re:8 months of OCaml after 8 years of Haskell in production ... by johnnyjeans on Tuesday December 03, 2024 @01:30PM (#42309494)
That'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.
Re:8 months of OCaml after 8 years of Haskell in production ... by yoyohello13 on Tuesday December 03, 2024 @04:34PM (#42311787)
Maybe 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.