Hacker News new | past | comments | ask | show | jobs | submit login

Yes, the program is written in terms of callbacks, just like monadic programs are written in terms of "return" and "bind" callbacks. This style isn't any more imperative than monadic programming. You could port this code to Haskell (using typeclasses instead of modules) and it'd work just as well.



Tagless final style programs are indeed written in terms of "return" and "bind" callbacks, but programs written with "vernacular monads" or free coproduct style aren't - they're plain old values and can be inspected as such. That's the style I prefer.




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

Search: