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

They're not so different in that regard. C# `await` can be adapted by making an awaitable and awaiter type[1], which isn't to dissimilar to how a computation expression in F# needs to implement methods `Bind`, `Return`, `Yield`, etc.

In both languages these patterns make up for the absence of typeclasses to express things like a functor, applicative, monad, comonad, etc.

[1]https://ecma-international.org/wp-content/uploads/ECMA-334_7...



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: