News for hackers. Stuff that matters.
Re:Types as Interfaces by mjarrett on Thursday July 25, 2024 @05:58AM (#41066773)
Hence, Objective Caml! This can be modeled in OCaml as an object type,

  type foo_bar = < _foo : int; _bar : string >
For a family of types matching any object with those methods, I think you can write something like

  type 'a has_foo_bar = < _foo : int; _bar : string; .. > as 'a

There are no comments on this comment yet.