1. 4
  1.  

  2. 1

    Is row polymorphism equivalent to treating every possible group of members as representative of an imagined anonymous subtype?

    For instance: if I wrote two objects that independently had a method with the same name and the same signature, would they be considered to have a type in common because they shared that name+signature combination, in a way that a type inference system could determine that an operation that used that method could operate on both, despite the fact that this imagined type was never declared anywhere as a type?

    (Or, is what I’m describing a different kind of system?)

    I seem to mostly see row polymorphism explained in terms of allowing additions to existing types, as opposed to decomposing type-ness down to the bare bones of compatibility for inference purposes at compile time, as duck typing does at runtime.