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

> Do you write imperative programs that execute statements — out of order? Ordering is precisely the point of monads, since they are monoids as well.

Sure do. After all, your superscalar CPU executes things out of order, and C is a pure functional language in the memory monad.

http://conal.net/blog/posts/the-c-language-is-purely-functio...

> And sum types are most definitely not enums, though Rust’s enums do use a bit strange terminology here.

Swift's enums too. But sure, in C it's an enum with a union at the end.



Well, being pedantic, sure almost every modern CPU uses OOE. But they must do so with the huge caveat that from the outside it should be equivalent to executing it in serial (notwithstanding CPU vulnerabilities). But this is an implementation detail only, we could just as well use an older CPU design.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: