“If it’s not OOP, it’s a non-extensible, spaghetti-code ridden piece of crap” some of OOPs staunchest defenders claim. And unfortunately, I think a good too many people are begining to believe it.
Don’t get me wrong - OOP certainly has its advantages. Libraries that use it are infinitely easier to conceptualize and, ultimately, to use, then ones that don’t. It’s also harder to make mistakes with these libraries - especially in loosely cast languages such as PHP whose functions can’t distnguish between data types.
However, OOP also has a distinct disadvantages. Namely, OOP code. is, traditionally, much harder to read than non-OOP code. Consider the following:
The Magic Words are Squeamish Ossifrage
vs.
{noun[magic_words]}+{verb[are]}+{noun[ossifrage]}
noun[magic_words]=The Magic Words
verb[are]=are
noun[ossifrage]=Squemish Ossifrage
The latter is kinda like what reading OOP-code is all to often like. Although I realize that even those doing procedural programming can make similarily obfusticated code, OOP almost encourages it. Not only do you have to contend with functions that are often times pointless - you have to contend with constructors, destructors, and inheretance. And that’s not counting the instances when objects reference other objects within them.
Now, I can appreciate trying to remove as many redundancies as possible - it certainly makes for more maintainable code - but it definitly does not make the code easier to read. Cross-reference multiple files and you risk getting hopelessly lost. Which file were you on? Where in that file were you at? Although it might not take much time to figure out, having to ask these same questions over and over again is going to, no matter how you cut it, add up. Before you know it, those looking to contribute small features will just stop. Contributing features should only an amount of itme that is proportional to the features size. Small features should take small amounts of time to develop and large feature should take large amounts of time. OOP makes everything take large amounts of time.
Given that, it kinda makes one wonder just how worthwhile OOP is. Developers who are already familiar with the code may find it easier to maintain but new developers almost certainly aren’t. In fact, OOP may even alienate new developers. And without new developers, who’s going to maintain programs once the old developers leave?
In short, OOP is not without its disadvantages and those who would claim otherwise would do well to think before they speak.
Some IDE’s may sorta mitigate this issue, but not all would-be developers are going to use IDE’s. And who could blame them? Controlling pseudo-WYSIWYG environments through menus and mouse clicks is something better suited to graphic artists then it is to those whose interests lie in code.