Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Runtime types in OCaml (lexifi.com)
7 points by emillon on Dec 8, 2011 | hide | past | favorite | 3 comments


There's a self-signed certificate over there, here is a direct link to the slides: http://www.lexifi.com/files/resources/runtime_types.pdf


Did I misunderstand something or is this like Haskell type classes retrofitted to O'Caml?

At least the example application in the paper, a pretty printer, is pretty neatly solved with Haskell's show class and PrettyPrinter combinators.


These ideas are also close to the "Scrap Your Boilerplate" approach (Data.Typeable & Data.Data typeclasses). ie, a generic pretty-printer can be derived from any type, not only those having a user-defined Show instance.

http://research.microsoft.com/en-us/um/people/simonpj/papers...




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

Search: