My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Why are so many developers afraid of objects?

Jason Knight's photo
Jason Knight
·Oct 18, 2017

I encounter this a lot in PHP where beginners and even many intermediate level developers are DEATHLY afraid of objects. It scares them away from even considering the vastly superior PDO, and it makes them use the pointless bloated mysqli_ functional wrappers instead of the object version -- even when said wrappers are pretty much full Pakled. You never go full Pakled.

I know I've been programming for so long objects are second nature, having learned them decades ago in Modula and Smalltalk -- but the level of resistance, hate, and outright fear I encounter regularly when you suggest using objects instead goes above and beyond any rational reason I can think of.

I just don't understand where this fear comes from since if the difference between this:

if (mysqli_stmt_fetch($stmt)) {

and this:

if ($stmt->fetch()) {

Is so hard to use that their reaction borders on outright terror, how the blazes did they even get as far as using the former?!?

I'd like a beginner's insight or explanation by someone who has this mentality as I'm trying to understand where it comes from as without that understanding, it's VERY hard for me not to be outright insulting about it.