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

How is macros or metaprogramming or anything that fills a similar role?



Not great, not terrible; the language supports annotations which mean nothing to the compiler but which pre-processors can take advantage of, and there is a framework called ppx which you can use to write your own preprocessor. There exist many pre-processors to do things like add inline tests, generate getter/setter/pretty-printing functions, and so on. Here is an example:

https://github.com/ocaml-ppx/ppx_deriving



Still can't figure out what the BER stands for




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: