OC

OCaml Defaults

Core OCaml coding conventions and idiomatic patterns

Details

Language / Topic
ocamlOCaml
Category
Style Guide

Rules

balanced
- Use `snake_case` for values, functions, and module names; use `CamelCase` for module types and `PascalCase` for type constructors.
- Prefer `let ... in` binding chains over nested `let () = ...` for sequential expressions within a function body.
- Use the `|>` pipe operator to compose transformations and avoid deeply nested function application.
- Use `type t = ...` as the primary type name within a module so callers refer to it as `Module.t` — this is the OCaml module convention.