Skip to content

Comment on Happiness is a freshly organized codebaseparent

Comments

I'm not plugging the language, but I've come to appreciate OCaml's module system with no imports and (mostly) globally unique module names. No circular dependencies allowed either. You can have multiple modules within a file (which is also a module named after the file name).

I structure larger projects as libraries with minimal dependencies that depend on one another, and dump all my modules with descriptive file names under the same directory within the library.

I vaguely remember reading something that hinted at Facebook doing something similar with their React components.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.