English lesson.

Only proper nouns are capitalized. The phrase "object oriented" is not a proper noun. The only other time to capitalize something is the first word of a sentence.

Edited by Ancient Dragon: n/a


And "I" is capitalized! Acronyms and initialisms may be capitalized too.

No not really. A int, float, double, short and any variation of them are not object, they are primitive data types. Functions are not object as well.

But you could have implemented [icode]double[/icode], or an equivalent type with a different name, for example, using a class, in C++, and you wouldn't be able to tell the difference. The terminology we happen to use for a particular language should not affect the definition of "object-oriented." For example, if Ruby used the word "blah" instead of "class," it wouldn't cease to be object oriented.

Is that your definition or is it a standard definition?

There is no standard definition. But your definition is weird.

I get the feeling that the way you are using the word "object" is in a different sense than the way object refers to in Object Oriented Programming.

I'm not. If you say that an "object" is an instance of a value whose behavior is defined by a class, then main is not an object. It should be noted, however, that the value [icode]main[/icode] is indistinguishable from other objects in normal usage, except for the backward-compatibility of C-style function declaration syntax. In particular, in C++, there's no reason to distinguish between instances of primitive types and instances of classes that have no public members.

Also, it's really strange to say that a language isn't object oriented simply because there are ways to create values which are not instances of some class defined somewhere in code. In particular, suppose you took Ruby, an ostensibly pure object-oriented language, and gave it a way to define values or datatypes that doesn't use classes. For example, suppose you added algebraic datatypes to the language. Would Ruby suddenly cease to be an object-oriented language, simply because it has a new feature? Why does removing features from a language cause it to be object-oriented?

Also, it's not like Ruby doesn't have primitive values. Functions are primitive -- at some point they are implemented with compiler magic. Especially callcc. They do look the same as other objects, though -- and that's the same scenario we have in C++: predefined types look like other types.

And why must everything be an object? If your language has a module system, do modules have to be real-live objects? Why can't they just be a built-in name resolution mechanism?

Because Objects should be able to be created and destroyed by them selves.

That's circular reasoning.

Also, we could remove features from C++ and add a few library functions to make C++ a safe, garbage-collected language. Would you call that language object oriented? We could even remove int and long from the language, and add some new mysterious predefined types named int and long whose instances are "objects." Then we could take that object-oriented language and add a bunch of features, and then we'd have C++.

Edited by Reverend Jim: Fixed formatting


>>in C++, there's no reason to distinguish between instances of primitive types and instances of classes that have no public members

Except that they are still different. You are able to add properties to the class if
you choose, where as you can't do that with primitive types. There are still subtle
difference between a instance of primitive versus instance of a class with no interface.

Overall, It seems like what your basically saying is that we can hide the non-object
stuff,and replace them with objects. Thats true we are able to do that. But that
doesn't change the fact that non-object type exist.

P.S :

It really doesn't matter to me what C++ is. All that matters is what I can do with
it. After all, at the end of the day its just a tool like every other language.
The term object oriented, is just something that someone made up, so we can argue
about it in a more sophisticated way. I guess we can just agree to disagree.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.