4 ms·
I summarize the article as "use OOP and design your classes well".
by snickerer 4y ago
I summarize the article as "use OOP and design your classes well".
- pencilguin 4y agoHas absolutely nothing whatever to do with OOP. OOP, where it means anything at all, involves runtime selection of operations according to types organized in hierarchies. TFA is about compile-time type compatibility enforcement.
- GnarfGnarf 4y agoAu contraire, types can be implemented with OO classes and operator overloading. Errors caught at compile time.
- pencilguin 4y agoClasses can be OO. Or not OO. Makes no difference, at compile time.
- snickerer 4y agoSorry, I was not clear enough. I come from the C++ world, where it is natural that types are checked at compile time. And where you would use classes to implement the 'sophisticated types' the author suggested. So in the ears of a C++ programmer the article says: design your classes well.
- pencilguin 4y ago"Lean hard on your type system's capabilities".