News for hackers. Stuff that matters.
Re:Inventing Monads by agumonkey on Saturday August 29, 2020 @04:32PM (#24319221)
to me the issue is twofold:

- cultural reliance on lambdas as the universal force (nothing against lambdas, but outside the fp world, there will be too much culture shock)

- representation as computation, the monad is only kinda building a graph to be evaluated, and each node can be wrapped with rules as you see fit

Re:Inventing Monads by 08-15 on Saturday August 29, 2020 @11:31PM (#24321145)
> the monad is only kinda building a graph to be evaluated

That's what the free monad does. Not every monad is a free monad, IO certainly isn't.

Re:Inventing Monads by edflsafoiewq on Sunday August 30, 2020 @12:23AM (#24321351)
Why isn't IO free?
Re:Inventing Monads by 08-15 on Sunday August 30, 2020 @02:52AM (#24321833)
Come think about it, it could be. That's not how it's implemented in any Haskell implementation I know of.
Re:Inventing Monads by AnimalMuppet on Saturday August 29, 2020 @06:27PM (#24319852)
Hmm. Your last line makes me think that they're, essentially, using monads to represent S-expressions. That seems... somewhat clumsier than just using S-expressions. You gain a really good type system, though.
Re:Inventing Monads by agumonkey on Saturday August 29, 2020 @06:59PM (#24320020)
I'm so not an expert I hope people don't read me too seriously. It's just my understanding of the FP world. A lot of time they will encode ideas in threaded closures that do nothing until they're consumed (the programmable semicolon doing the 'interpretative' part) which is a bit like a DSL tree and not so removed from a ~lisp.
Re:Inventing Monads by scns on Sunday August 30, 2020 @02:03AM (#24321677)
Hopefully Java programmers are used to lambdas since Java 8
Re:Inventing Monads by agumonkey on Sunday August 30, 2020 @03:00AM (#24321857)
It's not the same context really. A lot of languages have lambdas, and had before Java such as js, python.. but in these languages, it was an obscure feature.

In lisp/fp it was the "only" feature. People were thinking in how to encode anything with lambdas and not with the usual imperative traits (prog, do, loop). Consider that in 75, the first scheme paper was already talking about CPS (aka pre-monadic style).

I'm not making value judgement, it's just that using parameterized code blocks in LINQ select/where or java streams or python map/reduce is just the very first step in a long series of stairs. And monads are on the 3rd floor kinda.

So to the fp crowd it's business as usual, but for the rest of the world it's a twisted idiom at first.