`init` feels like an unhelpful name in OO. It doesn't give you an initial value, it initialises the instance that has already been created. Developers are often surprised that init doesn't return the instance, because they have a strong association with `new Foo()`.
Perhaps `finish` would have been a less confusing name?
Related Posts
I think you could build an interesting IDE with a tiny embedded LLM in addition to the usual tooling.
Features like 'extract method' would be much nicer if an LLM could provide a name. Choosing a good name is virtually impossible from just a typed AST.
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.
TIL Rust has an ambiguity `if Foo {}` -- is `Foo` a value of type bool, or a struct?
Rust solves this by defining a grammar production 'any expression except struct literals' and using it in this position. https://rust-lang.github.io/rfcs/0092-struct-grammar.html