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

Good OCaml projects almost always have interface files with thorough type annotations and documentation. It's the best of both worlds–the implementation files are free of the clutter of types, and the interfaces are strongly specified.


+1 to this -- good point! It sounds like the legacy project that the parent comment mentioned probably wasn't a "good" project in this respect, though.

This has a number of advantages vs. the `export` syntax used in Grain, too. Being able to look at one `.mli` file for a well-documented public interface is much easier than looking through a source file for what's been exported and what hasn't.




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

Search: