X Design Notes: Unifying OCaml Modules
2025-09-09
The author is designing a new programming language, X, aiming to combine PolySubML's type inference and structural subtyping with most of OCaml's functionality, particularly addressing the syntactic and conceptual differences between OCaml's module system and ordinary values. The post details how OCaml modules are unified in X, covering aspects like alias members in records, struct and sig syntax, module opening and inclusion, module extension, and abstraction with existential types. It proposes improvements to OCaml's module system, such as avoiding wildcard imports. The ultimate goal is a simpler, more understandable, and powerful programming language.
Development