Row polymorphism is not supported in
Standard ML, but is in some extensions or derivatives such as SML# and
Ocaml. The very existence of SML#'s first version was motivated by adding row polymorphism, based on a
SIGMOD '89 paper by Ohori et al., which introduced the "Machiavelli" extension to SML, although its name was changed later to "SML# of Kansai", before settling on the shorter name. The '#' in the name bears no relationship with
F#, but is due to the # operator used to
implicitly define the row-polymorphic types on field access. In Ocaml, row polymorphism is used by Ocaml's object types and also by its polymorphic variants. Ordinary record types are not row-polymorphic in Ocaml. Castagna et al. have criticized Ocaml for lacking
flow-sensitive typing, which is particularly noticeable in the type inference for polymorphic variants. They also note that since Ocaml lacks true, untagged
union types, some of the inferred types for polymorphic variants are too restrictive, in particular when product types are used in combination with polymorphic variants. F# can simulate row polymorphism using its "Statically Resolved Type Parameters" (SRTP) mechanism, which has also been informally called "static
duck typing". This however is limited to inline F# functions, so that they are not exported to the
.NET type system, which itself does not support such a feature. Row polymorphism is also supported in
PureScript. == Notes ==