I have studied Object-Oriented Programming over and over again and I feel like I know it like the back of my hand. However, there are some lingering doubts about it in my mind. Is it really a revolutionary idea or is it just a buzzword that people like to throw around? My personal theory is that it is a school of thought, a trend, but the ideas it is based on are sound.
I had a really hard time figuring out OOP when I first learned about it. I had spent a whole year learning about C++. Every program I ever wrote was based on these little function calls. Then we get to OOP (but we didn't actually call it that in class) and I was totally lost. It sounds funny now, but the constructor method really confused me. And not having to pass around variables was odd, too.
Done right, OOP is a good idea. But if you're trying to make Java into C++ (something I tend to do a lot), then it just makes things more confusing. I wrote a program for my architecture class that simulated hardware components and it made such perfect sense to create a class for each component. Before that I wrote a program to simulate a context-free grammar and it turned into a C++ program wannabe. It was a huge mess. Almost every method was in one class, so it was not modularized. Standard input in Java is really awful, too, and so is parsing (but it's a headache in C++, too). Anyway, that was a bad experience, and I guess it probably could have been done better with some more planning.
I think I'm just tired of learning about OOP and it being presented as the model of programming. In ten, twenty years I'm sure something else will replace it, so what's the big deal? Until then, I guess I'm stuck with Java because, for better or for worse, it's what I know best.

0 Comments:
Post a Comment
<< Home