News for hackers. Stuff that matters.
Re:Why category theory matters in programming by tel on Wednesday September 13, 2017 @08:05PM (#15243895)
That has a little to do with Scala just being a pretty bad place to implement most of these things. E.g., Monad transformers work just great in Haskell but are terrible in Scala due to the sort of terrible ways type parameters and inference work together.

Future also doesn't obey the monad laws for not being RT and that causes a lotttt of complexity.

Re:Why category theory matters in programming by throwawayjava on Wednesday September 13, 2017 @10:13PM (#15244515)
OK, I'm another data point for "studied category theory; program in an ML dialect; think it's silly".

Most all the theorist/logician/algebraist-turned-programmer folks I know all feel more-or-less the same way.

Just explain the pattern in english. Might as well call it a FooDeBar. Giving axioms and such is usually a waste of The Man's money and my time.

That said, I think it's extremely valuable to see this sort of thing in an academic or side project/enrichment activity setting. The mindset and mental model are fantastically helpful. See dshnkao's post, for example.

Re:Why category theory matters in programming by Myrmornis on Wednesday September 13, 2017 @10:47PM (#15244648)
Just to be clear, you're advocating:

1. Don't use terminology from academic category theory / abstract algebra in computer programming

2. But if you haven't studied these things, and you are a programmer, it might be very enlightening to do so.

Is that right?

Re:Why category theory matters in programming by throwawayjava on Thursday September 14, 2017 @12:41AM (#15245065)
> category theory / abstract algebra

Woah there!

But otherwise, yes.

Most working mathematicians have seen category theory and borrow bits and pieces of notation and such. But most of their work is done in far more concrete settings.

Working programmers should adopt the same arrangement.

It's a subtle position, but not an inconsistent one. I promise :-)

Re:Why category theory matters in programming by hota_mazi on Wednesday September 13, 2017 @10:27PM (#15244582)
It's not just monad transformers, monads themselves are pretty awkward to use in any language that's not Haskell. And actually, a lot of FP languages simply don't even have monads at all (OCaml, F#).

Monads should never have escaped Haskell.

Re:Why category theory matters in programming by tome on Thursday September 14, 2017 @05:37AM (#15246282)
> Monads should never have escaped Haskell.

They should have put them in a monad.

Re:Why category theory matters in programming by s4vi0r on Wednesday September 13, 2017 @10:58PM (#15244690)
Isn't a Monad just the fancy name for a type/structure that implements map and flatMap in a lawful manner?
Re:Why category theory matters in programming by hota_mazi on Wednesday September 13, 2017 @11:21PM (#15244768)
Close: the required operations are `flatMap` and bind/pure/point/lift/return/whatever-you-want-to-call-it.

You can derive `map` from these two other functions so it doesn't need to be part of the interface.

Re:Why category theory matters in programming by ebola1717 on Thursday September 14, 2017 @10:15AM (#15248218)
Bind is flatMap (>>=)

Confusingly, map in scala is fmap in Haskell

Re:Why category theory matters in programming by hota_mazi on Thursday September 14, 2017 @12:04PM (#15249323)
Oops you're right of course. And I can't edit my post.