9

“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.”

—Chris Scalfani, from https://medium.com/@cscalfani/...

Comments
  • 1
    "...And the entire jungle is going to crash you (mem leak)"
  • 3
    These days, I almost always use inheritance in C++ to: make interfaces and implementations; implement type erased APIs; extend or wrap functionality (with private inheritance); or to perform compile-time dispatch with CRTP.

    I haven't had to deal with any sort of deep virtual hierarchy in 20 years.

    Encapsulation, for me, is the only generic win from OO. Otherwise a functional separation between operations and data structures, together with enforceable invariants, has made (coding) life immeasurably easier.
  • 3
    I mean, it's not just OO languages at this point, basically everything these days gets executed in a virtual environment
  • 1
    ... and with imperative languages, you give each gorilla their own banana, but you forgot to reset a pointer to the first banana, and all hell broke lose because eat(gorilla, banana) that wasn't theirs.
  • 0
    I get it, but I don't at the same time.
    Medium gets worse everyday, people talk shit about everything. To get attention, to disrupt things... just like the media.
    This is miss information
Add Comment