Re:The C++ Build Process Explained
by codesmythe on Wednesday November 14, 2018 @11:37PM
(#18456900)
OCaml also does it better. Its split between .ml (implementation) and .mli (definition) files is taken directly from Modula-2 [1].
[1] https://discuss.ocaml.org/t/what-is-the-reason-of-separation...
Modula-2 does it better. Each module split in two files - definition and implementation. Unlike C++ header files, def files are compiled rather that inlined, so they don't have a potential to produce different result for each source file that references them. The result is 100% reliable dependency graph across all source files, no need for a makefile, and blazingly fast compilation (each def file is only parsed and compiled once).