Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> So by linking the programming structures you are using (e.g. monads) with associated mathematical structures (also called monads[1]), all of the mathematical knowledge surrounding that structure suddenly becomes available.

Only if what the language does with monads exactly mirrors what CT does with monads. Otherwise the language subtly lies to you.

In fact, this may be the case. I seem to recall that Haskell monads only have to obey two of the three monad laws. That is, they don't have to truly be (CT) monads. That's supposed to not matter, but if nothing else, it kind of makes your argument a bit less well grounded.

> This is rather like how doing numerical calculations with matrices benefits from the wealth of knowledge about linear algebra.

In the exact same way, this is only true if the matrix package truly implements linear algebra correctly. To the degree that the matrix package doesn't do that, your reasoning based on linear algebra leads you astray.



> In fact, this may be the case. I seem to recall that Haskell monads only have to obey two of the three monad laws. That is, they don't have to truly be (CT) monads.

That's news to me! Mathematicians wouldn't find the monads that appear in Haskell especially interesting, I think (at least not the ones that are instances of `Monad`), but that's beside the point.


So I'm repeating what somebody said rather than my own claim, but I think it was that Haskell monads didn't have to be... one of left- or right-associative. But they had to be the other.

Wish I knew of a good way to search HN; it was in a comment here maybe 6 months or a year ago...


> Haskell monads didn't have to be... one of left- or right-associative. But they had to be the other.

That's very puzzling. I wish I knew what you were referring to!


Hah! Found it.

https://news.ycombinator.com/item?id=7770129

That was my source (I was the parent). Unfortunately, it doesn't quite answer your question...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: