Hacker News new | past | comments | ask | show | jobs | submit login

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.



You can use type aliases in f# and use them like interfaces.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: