Learning about OCaml's OO features today.
It rather reminds me of Go: you don't need to do up-front design of what common methods your objects have. Its type is just its methods (structural typing AIUI).
You don't even need to define classes at all! Just return an object.
Related Posts
Bootstrapping a language can be immensely satisfying.
I've added the ability to define stub types in the Garden stdlib and suddenly I don't need to special-case Int or String! They're just normal type declarations.
Playing with optional type signatures in Python, I realise that the return type is the most important to me.
I'd much rather have a function with only a return type instead of a function with only parameter types. It's often quick to add too.
Counter-intuitively, if you're writing a parser for a programming language, you need it to be a total function. As soon as you build IDE tooling, you need ASTs from invalid or incomplete input.
The parser should return (Ast, List<Error>) rather than Result<Ast, Error>.