News for hackers. Stuff that matters.
Re:The Early History of F# [pdf] by Smaug123 on Saturday June 13, 2020 @01:41AM (#23507105)
You can do anonymous records in F# - you don't have to explicitly give a name to your record types - but structural typing solves similar problems to those solved by interfaces, and F# thoroughly supports interfaces, so I imagine it wasn't thought necessary to make the type system any more structural.
Re:The Early History of F# [pdf] by UK-Al05 on Saturday June 13, 2020 @05:31AM (#23508151)
You can use type aliases in f# and use them like interfaces.
Re:The Early History of F# [pdf] by jolux on Saturday June 13, 2020 @10:41AM (#23509697)
Sure, and so you can in OCaml and Haskell too. The compatibility will still be determined by the name you give that type and not its structure.