Why some people says C++ is not OOPS ??
I think C++ provides all OOPS facilities in a customized way.
Printable View
Why some people says C++ is not OOPS ??
I think C++ provides all OOPS facilities in a customized way.
What's OOPS?
Hmm
a very short question with a very huge answer!
Object Oriented Programming Structure
I am afraid that I have never heard of that term (and a search of the Web reveals nothing much). How does it differ from object oriented programming? After all, C++ is a programming language, not a structure, though languages have structure.
EDIT:
Okay, I am reasonably certain that OOPS == OOP. Consequently, read Stroustrup's answer to the FAQ: Is C++ an Object-Oriented language?
I've seen a lot people saying that.
none of them shows me a valid reason
I asked one of them she said with friend you can overrule public/private/protected etc..
I said Its a feature of C++ that it lets you to do that you just dont use it If you dont like that feature.See said letting users doing that is not pure OOPS.
I didn't understand.
Others also say some nonsence things they say Java and .net is pure OOPS but C++ is not but they cant explain clearly the "Why"
Yes, this sounds like nonsense. Outside code can't override anything, unless the class itself grants friendship.Quote:
I asked one of them she said with friend you can overrule public/private/protected etc.
In a "pure" OOPL everything is an object, which indeed isn't the case in C++.
It's true that you can override private member functions of your base class. That doesn't mean C++ is not object-oriented, though.
I am going to to go ahead and run with this OOPS acronym.
"A new CS student." : Professor, what is C pound sign?
"Mister C" : OOPS
Sounds most excellent.
<chanting>Language war, Language war!</chanting>
To be truthful, "non-obliging" parts of applications can do anything they like with an object. private, public and protected are there to help programmers, not to stop someone with an evil intent from causing troupble. If that was the case, we'd also prevent some pretty useful features in C++ (such as the ability to take the address of just about anything and turn it into a void pointer and operate on it as if it was a chunk of memory with no particular content, and then bring it back into the form of an object [of course, there are restrictions to how far you can take this).
Different languages take different approaches to things. C++ is a "low-level language with object orientation". That allows it to do things that you are not able to do (with ease at least) in other, higher level, languages. That in itself does not eliminate it from the class of "object oriented" languages - but of course, that group is big, and different "language advocates" will have different view of what language is "in" and "out" of that group.
--
Mats
Agreed. I think when one says OOP they typically think of Java or C#. They don't usually think of C++ or Delphi. I don't know that its a topic worth investing too much time into as it is not crucial to development in any particular way.
There certainly are different flavours of OOP, just like there are flavours of ice-cream. And a lemon sorbet doesn't recemble a very creamy chocolate-chip-cookie ice-cream, but they are still different forms of ice-cream. C++ is one OOP language, Eiffel, Simula-67, C#, Java, SmallTalk and many others are also OOP languages. If you then start saying "it must have X and Y to be a 'proper' OOP language", that's like saying "you must have cream in ice-cream", thus eliminating the sorbet from the group of ice-creams. And in some camps you'd be hailed as a true believer of ice-creams if you say that, but if you turn up at the "100th Anniversary Sorbet Makers Convention", you probably would be covered with various rotten fruits and vegetables pretty soon. Same applies to anyone turning up at a C++ convention claiming it is not an OOP language...
--
Mats
I think you and I are on the same page, Mats, but I think our fundamental description sounds kind of like we have polar opposite stances. C++ uses objects, so why not call it an OOP language. But to that end, why not just call Python an OOP language. Or JavaScript. The point I was making is simply there is no use getting all caught up on strict or loose definitions.
I definitely agree with Master5001 - we are on the same page. What I was trying to explain is that DIFFERENT (OOP) languages are like ice-creams, they come in different flavours, and someone coming from a particular angle would say that the other end of the range may not even belong in the same category.
Depending on where you stand on particular issues, one may say that sorbet isn't "real ice-cream", or one may include it and many other things into the ice-cream grouping (is a frozen Mars-bar an ice-cream?). Likewise in the computer languages, there are some that "are well inside the common criteria", and others that end up on the "edge".
[Me and iMalc would be in the same corner of the ice-cream parlour, that's for sure ;-)].
--
Mats