Question:
Difference in programming languages?
?
2014-02-27 01:28:11 UTC
Hi. What is the difference between C, C++ objective C , and many other "C" type languages in existance?
Please explain to me in simple terms cause I have absolutely no background in programming
Three answers:
Andrew S
2014-02-27 06:10:03 UTC
Essentially all languages fall somewhere within a spectrum between small, fast, and with a lot of low-level control on one end and higher level, faster to develop languages with less control and generally result in slower and larger programs.



C is very much in the first camp - you have almost complete control of the computer and direct access to low-level or obscure operating system requests. The downside is that C development is an awful lot slower than other languages, in fact you will spend a lot of time implementing what are essentially standard library facilities in other languages. On the other hand once written that code will be honed for the exact requirements of your program and will not waste time or code space with facilities that other programs may need from time to time but are utterly irrelevant for yours.



C++ and Objective C were developed at around the same time and both seek to extend C with object-orientated facilities. Object orientation seeks to make writing programs easier by promoting code re-use, that is using existing code within a new program instead of rewriting from scratch. The downside to that approach is that as hinted previously, that existing code may include a lot of facilities that your program doesn't need which tends to make OO programs both bigger and slower than the equivalent C program.



Between the two Objective C uses a simpler OO model but is very much a niche language, basically it has no traction at all away from Apple platforms. C++ is much more advanced and is a strong choice when used effectively. The price is that it is an incredibly complex language - even the inventor has admitted to being surprised to discover interactions between language features years later. Many professional C++ programmers fail to use the language effectively, and there is an awful lot of code out there which is basically C with a few of C++ glossy bits tacked on, incurring the performance costs of C++ without any of the real benefits.



That complexity lead to the later "C with objects" languages such as Java and C# which attempt to simplify things, usually back towards being more like Objective C and by throwing away more backwards compatibility with C. As languages they're fairly elegant but come with external baggage - Java is tied to the JVM which compromises performance and has it own not inconsiderable resource requirements. C# is a proprietary Microsoft language, so you are limited in choice of development tools and runs on Windows only.



Finally you have a whole other class of C-derived languages optimized for particular uses of which PHP is probably the most prominent. That is optimized for the creation of dynamic web pages and interfacing the Web with other software such as databases. Compared to C you can get an incredible amount of work done in next to no time, but the resulting programs are slow and as a programmer you have almost none of the low level control C gives you.
Shady
2014-02-27 10:27:44 UTC
Nafy has no clue what he is talking about lol. Objected oriented programming made C++ much easier to use than C. Higher level programming languages are easier to understand. A lower level language like C is much more difficult than C++. This isn't even debatable. You tend to play with memory alot more when using C than with C++.



You don't need to worry about memory management in Java/Python because of memory management. I mention these two programming languages because Java is much like C++ and Python was written in C.



Some languages are made better for various things. For example, like system embedding you want to use a lower level language like C. However, for video games you want to use C++ because of it's object oriented capabilities. Apple uses Objective-C which is another object-oriented programming language. I don't know Objective C so I can' speak on it. Same with C# (C sharp) Microsoft uses C#.
Kaydell
2014-03-01 05:28:33 UTC
The C language came first.



Objective-C and C++ both include all of the C language plus they both add objects and classes which means that they are more like how people think.



Objective-C and C++ as said to be "higher level" languages because they allow programmers to think more like humans and not like the computer calculates.



Objective-C is used primarily for Apple devices such as the Macintosh and for iOS devices (iPodTouch, iPhone, and iPad).



C++ is used for many different things.



It is possible to use both Objective-C and C++ which is called Objective-C++ but this is usually only for Apple devices when both Objective-C and C++ are needed for some advanced reason.



C# (pronounced C-Sharp) is mostly for programming devices running Microsoft equipment. C# is something like Java.



Generally for courses such as Introduction to Computer Science Java is a good language. Java takes care of many details that you would have to worry about yourself if you were to first learn C.



Which language that you learn after Java depends upon what you wanted to do.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...