3 ms·
> It reminds me of this quote: "The problem with object-oriented languages is they've got all this implicit environment that they carry around with them. You wa
by HumanDrivenDev 9y ago
> It reminds me of this quote: "The problem with object-oriented languages is they've got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle." - Joe Armstrong
What Joe Armstrong (who I admire) complains about is actually what I love about OO languages. And for me that's the true essence of what OO is, and how it differs from non-OO. People keep trying to frame OO in terms of mutability (completely orthogonal) or C++/Java coding practices (C++ doesn't define OO because it has objects, anymore than it defines FP because it has lambdas).
The real difference, the real paradigm shift is in data + functions vs objects. And I maintain that objects are more powerful and better idea than data + functions. The banana can't be peeled without the gorillas opposable thumbs.
- throwaway7645 9y agoI'd love to see if in 50 years we're closer to Smalltalk, Haskell, or something completely different. I'd love to say something radically different, but I have a feeling static types will continue to increase in popularity. No real evidence, just a gut feeling. Thanks for posting your feeling on OO. In some ways I've always felt very restricted writing OO (even in Python), but learning Smalltalk is making me see it from an entirely different perspective.
- HumanDrivenDev 9y ago> I'd love to see if in 50 years we're closer to Smalltalk, Haskell, or something completely different. I guess in my mind FP and OO are orthogonal. If I write an immutable object and I send it messages that are referentially transparent, am I not doing both? Would it help FP people if they thought of such objects as "a record of partially applied functions"? So I hope both. I'd love if there was a statically typed, high level pure OO language without all the cruft of Scala or C#. Maybe I have to wait for the next programming fashion cycle for that to happen. > Thanks for posting your feeling on OO. In some ways I've always felt very restricted writing OO (even in Python), but learning Smalltalk is making me see it from an entirely different perspective. I often wonder if I need to coin a better term for "OO" for what I am talking about. Alan Kays whole schtick was that objects contained both data and procedures, but by combining them they became something new, and more than just the sum of their parts. That's the powerful idea to me. But language changes, and OO in 2017 just means "Java".
- __33__ 9y agoFor me your last sentence is not an argument why OO is "more powerfull and better". The banana can be peeled very well by anyone or anything with an opposable thumb (a function). No need to limit yourself to a gorilla (an object).