Y
Hacker News
new
|
ask
|
show
|
jobs
by
zeugmasyllepsis
2708 days ago
I'm certainly not well versed in OCaml, but my understanding is that it is also structurally typed. This particular example would also be permitted in OCaml, correct?
1 comments
octachron
2708 days ago
No, records are nominally typed in OCaml, thus the two types `A` and `B` would be deemed incompatible.
link
wtetzner
2708 days ago
But objects in OCaml are structurally typed (well, row typed).
link