41 ms·
Actually, the more precise formulation would be: classes are related to functions as both are abstractions. The author conveniently leaves out the differences:
by choeger 6y ago
Actually, the more precise formulation would be: classes are related to functions as both are abstractions.
The author conveniently leaves out the differences: classes yield objects, whereas functions yield any kind of value. Classes are second-class citizens, whereas functions (usually) are first-class. Functions have a type, whereas classes (often) are (or are isomorphic to) one.