Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Of course it's very easy to explain a million reasons why OOP is a good thing. These include: design patterns, abstraction, encapsulation, modularity, polymorphism, and inheritance.</p> <hr> <p><strong>When not to use OOP:</strong></p> <ul> <li><strong>Putting square pegs in round holes:</strong> Don't wrap everything in classes when they don't need to be. Sometimes there is no need and the extra overhead just makes your code slower and more complex. </li> <li><strong>Object state can get very complex:</strong> There is a really good quote from <a href="http://en.wikipedia.org/wiki/Joe_Armstrong_(programming)" rel="noreferrer">Joe Armstrong</a> who invented Erlang:</li> </ul> <blockquote> <p>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.</p> </blockquote> <ul> <li><strong>Your code is already not OOP:</strong> It's not worth porting your code if your old code is not OOP. There is a quote from <a href="http://en.wikipedia.org/wiki/Richard_Stallman" rel="noreferrer">Richard Stallman</a> in 1995</li> </ul> <blockquote> <p>Adding OOP to Emacs is not clearly an improvement; I used OOP when working on the Lisp Machine window systems, and I disagree with the usual view that it is a superior way to program.</p> </blockquote> <ul> <li><strong>Portability with C:</strong> You may need to export a set of functions to C. Although you can simulate OOP in C by making a struct and a set of functions who's first parameter takes a pointer to that struct, it isn't always natural.</li> </ul> <p>You may find more reasons in this paper entitled <a href="http://doc.cat-v.org/programming/bad_properties_of_OO" rel="noreferrer">Bad Engineering Properties of Object-Oriented Languages</a>.</p> <p><a href="http://en.wikipedia.org/wiki/Object-oriented_programming" rel="noreferrer">Wikipedia's Object Oriented Programming page</a> also discusses some pros and cons.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload