|
|
|
|
|
by austinz
3699 days ago
|
|
Scala tries a lot harder than Swift to unify object-oriented and functional programming principles. For example, in Scala operators are (IIRC) implemented as methods on objects, there's a 'Nothing' bottom type that is used for covariant generic parameterization, and ADTs are implemented using inheritance in the form of case classes. Swift has no top-level object type or bottom type, and a lot of its more functional style features (ADTs in the form of 'enums', value types that enforce immutability) are completely divorced from the object-oriented part of the language. |
|