C/C++ Why is C++ not considered a purely object oriented language?

  • Thread starter Thread starter C0mmie
  • Start date Start date
  • Tags Tags
    C++
AI Thread Summary
C++ is often debated as not being a purely object-oriented language because it is built on top of C, which was not originally designed for object-oriented programming. While C++ supports object-oriented features, its design can lead to complexities that make it less optimal compared to languages like Smalltalk, which was specifically created for object-oriented programming. The discussion highlights that C++ is a hybrid language, allowing both procedural and object-oriented paradigms, making it suitable for various applications, including competitive programming. Additionally, the importance of proper class implementation and memory management is emphasized for effective object-oriented design. Ultimately, C++ remains a popular choice for learning and system programming due to its versatility.
C0mmie
Messages
64
Reaction score
0
I am a student of computer science, and naturally was shocked when, during my recent trip to a bookstore, was told that C++ in not really object oriented. The guy at the store referred me to a language called Smalltalk, which is supposedly the true object oriented language. I assume that most people would share my point of view in agreeing that C++ is an object oriented language, but can someone explain to me why it would not be considered as such, while Smalltalk would.
 
Technology news on Phys.org
C++ is object-oriented; however, the OO is basically welded on top of a language (C) not designed for that purpose. So the design is less-than-optimal, and it can be a pain in the ass to use sometimes. Those of us that remember using tempates and STL in the old days know this well... :)

Smalltalk was IIRC one of the first OO designed languages, but there are many others. I like Java, personally.
 
Hello!
You can read:

Hi!
Of-course "Class" is good as it reflects OOP, but in contests (Real Time) though you have "BigInt" type class, you then can use the functions only. You don't need to write the OOP feature based codes.

But, the class need to be well implemented in sense of OOP and as well as proper memory usage and readability. I am learning Java (and C#) and I like it as a developer's language which is for internet programming and other professional works, But not suitable for contests.

C++ is a hybrid language. For contests and also for learning purpose C++ is the best I think. Because here you can learn both procedural oriented programming as well as object oriented programming. For system programming you have the power in C or Assembly Language. For AI based or expert system development I will like PROLOG as it works with clauses and logic. It's also goal oriented. And that's why it is easier than LISP as I saw LISP is full of brackets and brackets. For mathematics related problems you can use MATLAB or Maple or Mathematica type soft packs. They are good for engineering purpose.

And another important thing, don't make it habit to use the advanced routines provided by the complier or any company or internet. Try to make it yourself otherwise you will be lazy like me who is fond of ready-made codes provided by my friends. I always use my junior students to make the code for me. I make the algorithm clear to them and they do the rest for me.

Oh! Last thing, you can make your BigInt class into BigNumber class by give it the power of real value arithmetic with huge precisions. It can easily achieved by inheritance. You can inherit all the properties from BinInt class and extend it by writing procedures for real i.e. long float or double type values.

Taken from:

http://acm.uva.es/board/viewtopic.php?t=370&start=30
 
Last edited by a moderator:
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top