tags:

views:

134

answers:

1

Does f# is a Nominal typed or a structurally-typed language? (I know that OCaml is structurally type, though f# doesn't seems to be so).

+7  A: 

F# is nominative. You can do a few structural tricks via some exotic mechanisms, but the type system of the language is primarily nominative.

Brian
If OCaml is structural, how did F# get turned around 180 degrees?
Robert Harvey
F# kinda took the functional structure and declaration syntax from OCaml, but the object type system from .NET.
Brian
See also http://stackoverflow.com/questions/3162387/why-is-fs-type-inference-so-fickle/3162832#3162832
Brian