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

Yes it makes sense for a mathematical function to diverge. You just need to change the domain and range to their "lifted" version. See [https://en.wikibooks.org/wiki/Haskell/Denotational_semantics]


That gives you the <sarcasm>very pleasant</sarcasm> choice of working in a category without sums or tensor products distributing over sums! No thanks.

In practice, Haskellers don't think this way about their programs. Haskell's library ecosystem attests to the fact they think of Hask as some moral analogue of the category of sets, which has both sums and tensor products. And the worst sin a semantics can commit is to not reflect how programmers actually think about their code.




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

Search: