by Dwayne Phillips
“Dot Notation” has some nice things going for it. Let us not, however, believe that it is object-oriented programming.
“We do object-oriented programming,” said proud practitioner, project manager, and recruiter. “Believe us,” they all added.
Silly me. I did believe these well-meaning folks. Time teaches.
class-name DOT function-name
See? Object-oriented programming (oop). Sorry. The above uses dot notation. It does not necessarily mean oop.
What is the object? What are the methods or functions or whatever we call the things that manipulate or operate the objects?
The two are not the same. The DOT is a nice thing. It allows us to say, “Hey, I’m talking about the blue addition function, not the red addition function. They are different.” The DOT does not mean oop. Too often we claim it does, that is convenient when a job recruiter asks us that veto-laden question. “Do you know oop?”
“Why yes,” I answer. “I first did oop in 1983.” (Which I did, and with real objects, not just dots.)
The other end of the phone line goes silent.
Consider, as an example, money. Let’s define a class for money. There are a few things we can do with money like add, subtract, divide, and various forms of input and output. Notice that we cannot multiply money (what is $3 x $4? $12$$ or something?).
Try to define this in one of the popular IDE’s in one of the popular programming languages. It doesn’t work well. The IDE tries to make window classes and such the foundation. That is a quick and easy way to make an application with windows, icons, menu, and pointing devices. oop? Sorry.
So folks, from someone who made all the mistakes and pounded my head to the wall, let’s not confuse the fundamentals. It is okay if a recruiter confuses the terms because that is what the checklist shows. The rest of us, however, should have it straight by now.
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment