C++/C++ vs Delphi
I am a high school student with reasinable knowledge of Delhpi programming for WIN32 - Language: Object Pascal. I work with Borland Delphi 2005.
I want to know that which are the most important features of C++ compared to other programming languages specially Object Pascal in Delphi.
Another question: Does C++ supports hardware programming better than other lnguages or not & does it has a feature for low-level programing? For example in object pascal of delphi the keyword "asm" helps to do so.
Thank a lot. Please don't mention my spelling and grammer mistake as my language is not English.
Hello Amir, thank you for the question.
I'm not sure how much of an explanation I can provide you with, as I have never programmed in Delphi before.
In my opinion, I think that C++ is the most versatile programming language there is. It provides flexible constructs that can be used without the extra overhead unlike the Java programming language. C++ supports hardware programming quite like you describe Delphi. In windows, the __asm keyword denotes a section of assembly code and can be imbedded into any other normal C++ function. One of the most important features of C++ (other than object orientation of course) is the concept of completely typesafe programming through templates. Not even Java offers this type safe protection. Whereas in Java and regular C code you type cast your variables to program generically, this is not safe and can crash or cause unpredictable behavior. In C++ you merely declare your class as a template class and then pass the object type when you instance the class. The compiler then generates all the type safe code on the fly.
I hope I was able to provide you with some insight.
I hope this information is helpful.