News for hackers. Stuff that matters.
Re:Inventing Monads by chowells on Saturday August 29, 2020 @04:06PM (#24319033)
I think most of this happens because lots of people say things like "the IO monad" when they actually just mean "IO". It misleads people into thinking the monad part is important. It isn't. IO is the tough concept. Monad is almost trivial.
Re:Inventing Monads by ridiculous_fish on Saturday August 29, 2020 @04:17PM (#24319113)
Good point, I agree. But you must learn it to get anything done. Grappling with IO + monad + do-notation all at once is hard!

I once spent a day thinking I had misunderstood something fundamental, but really I just had an errant tab instead of a space.

Re:Inventing Monads by chowells on Saturday August 29, 2020 @05:37PM (#24319600)
Ok, yes. Monads as a concept are almost trivial in comparison to thinking in terms of the IO type. But that doesn't mean they are easy and don't add more hurdles to get over. I think I undersold how daunting it can be to face all the new things at once, and you're right about it.
Re:Inventing Monads by yomly on Saturday August 29, 2020 @05:53PM (#24319686)
As a recent Haskell learner, I found the indentation part of Haskell hard to learn and a little undiscoverable/hard to google.

The number of times I've used curly braces, single lines or expression substitution to bail me out is many...

Re:Inventing Monads by neckardt on Saturday August 29, 2020 @09:35PM (#24320642)
You might like hinc, it's haskell but with C style syntax: https://github.com/serras/hinc/blob/master/why.md
Re:Inventing Monads by yomly on Sunday August 30, 2020 @05:28AM (#24322343)
Thanks for the suggestion but Haskell would not be Haskell without its ML-yness.

As confusing as operator precedence can get, I do see the beauty in "programmable whitespace" but to get anywhere close in other language syntaxes you need to do even more perverse things like here [1]

If I did have to choose a different syntax for haskell it would be S-expressions rather than Algol so perhaps Hackett from Lexi Lambda

[1] https://stackoverflow.com/a/48553568

Re:Inventing Monads by scns on Sunday August 30, 2020 @02:01AM (#24321669)
I like it.

"This is not by coincidence: people learning Haskell usually have problems with point-free style not because of the composition operator per se, but because code is suddenly "reversed". Other communities such as F# have adopted the "pipe forward" operator instead of composition as the default style."

That's why i prefer the reverse application operator & to .

Re:Inventing Monads by dllthomas on Saturday August 29, 2020 @05:10PM (#24319466)
+ type inference + return-type polymorphism!