2 ms·
As far as typed FP languages go: - Scala has the whole OOP stuff - F# as well - SML: you probably need to do it by hand, with a record of closures, or somethin
by c-cube 6y ago
As far as typed FP languages go:
- Scala has the whole OOP stuff
- F# as well
- SML: you probably need to do it by hand, with a record of closures, or something like that. It's ugly but it works.
- OCaml has objects (it's in the name), first-class modules, or records-of-functions; all of which can replace abstract methods successfully.
- Haskell can rely on typeclasses to do the virtual dispatch, I think. Not an expert on that.
So I'd say it might not be as ergonomic, but the capability is still 100% there.