4 ms·
> let the compiler work out all types and put them in as module interface ... type annotations at abstraction boundaries Right - that's not global type inferen
by chrisseaton 6y ago
> let the compiler work out all types and put them in as module interface ... type annotations at abstraction boundaries
Right - that's not global type inference. It's intra-module type-inference.
- GregarianChild 6y agoI don't understand this objection. OCaml does full program inference. I just prefer to wrap things into modules from time to time. That's a pragmatic choice I make, not a restriction on type-inference. Aside, when I decide to change where I put module boundaries, full program inference helps too: I just throw away the old module definitions, draw different boundaries and re-run inference.
- chrisseaton 6y agoI'm not objecting to anything. This is how I thought most people used inference in OCaml.
- amw-zero 6y agoYou do need to write the types for records though.