3 ms·
> But, that being said, I think all languages are coming around to adding first class functions. Object-oriented languages have always been higher-order. Funct
by catnaroek 10y ago
> But, that being said, I think all languages are coming around to adding first class functions.
Object-oriented languages have always been higher-order. Functional programming is great, but object-oriented languages have always had first-class procedures, whether they compute mathematical functions or not. And not all procedures compute mathematical functions in functional languages either.
What object-oriented languages lack is an emphasis on values, rather than the memory locations (aka object identities) that contain said values. The benefits of not worrying about object identities cannot be overstated: Removing the spurious distinction between memory blocks that hold equal values automatically endows the language with a richer equational theory that can be used both by language users (for reasoning about correctness) and language implementors (for optimization purposes).