What is C++? What does it do? Wtf?

April 11, 2006

Well hello,

I’ve been doing some reading and have managed to learn a bit. Lemme start off:
C++, like any other programming language, has its own syntax. The good thing about C++ is that it is a very shorthand syntax; meaning that you do not have to write AND, NOT, END IF et cetera. That is why it is good for our hands; less movement, it is good for clarity and understandability (huh?); manageable among a group of people, object oriented; which I will touch upon later. But before the pros and cons of the language, lets give some factual information about it.

Firstly, C++ is a “high level” language. No, it doesn’t mean that C++ is the best. It means that it is very abstract. Low level languages (like assembly-machine language) have to be specifically coded for that apparatus, so if you are writing one code for old Intel processor, you will need to alter it before you compile it for the cutting edge processor because there probably will be some differences in the architecture of the processors. On the other hand, C++ is high level, which means it does not concern itself with what kinda processor it works on, moreover it even does not care (well, sometimes) whether it is working in a Windows platform or on a Linux. I have a good comparison to make which I believe is both insightful and understandable. Low level languages are like simple and detailed instructions you may read off from a “Do it yourself” home kit. On the contrary, a high level language will be a fantasy book full of description, and the interpretation is left to the reader. Well maybe not exactly the case, but still, you know what I mean.

I did some research and was in a dilemma about whether to use Microsoft’s Visual C++ or Dev-C++ but being the Microsoft-hater I am and for the sake of my wallet, I chose to go with Dev-C++. It can be downloaded from HERE. I will use this for all the coding I do in C++.

Since we cleared up all that stuff, we can move on. Why? Why C++ when there are tons of other programming languages which promise the same opportunities and even more? Because:

1) C++ is and Object-Oriented language

It allows objects to interact within the program. This gives a little power to avoid any exploits and bugs. More importantly, rather than writing a structured list of instructions as code, you write parts and modules of it. Since semantic markup is very popular these days, in C++ too, you can get the chance to semantically mark up objects, rather than altering functions for the program to function properly (!). Maintaining the code later on is more convenient this way, since you only have to modify the object once.

2) Popularity and Mobility

C++ is very very popular language. People use it for nearly all purposes. It infers the users with so many different techniques that you can do literally anything you want with C++ code. Another aspect of it is that it is very mobile, as I mentioned before. It can work in any system or any platform without the need to alter any code.

3) Short and Fast

The general structure of C++ is shorthand writing. No stupid abbreviations and meaningless markups. It only uses special symbols to communicate with the compiler. Therefore when you look at a foreign code, you can see the main points of the code more clearly. Since it leaves out English words such as “and” “not” etc, your attention is focused on the code itself. This shortness has one more benefit and that is the increased speed. The preprocessor (thing that readies the code for compilation) does not have to cope with words, only special symbols, so it is fast to execute too.

4) Modulation and Compatibility

Backward compatibility is supported in C++, which means that any code written in C can also be included in a C++ program. Also, the program can be composed of different files: one file for functions, others for variables and on and on. You can go and divide the code to smaller pieces, which not only helps for maintenance, but allows a group of developers to work collaboratively, without messing up the code itself for others.

Ok I gotta get some sleep. I have at least learned some cool stuff about C++. Tomorrow (as soon as I finish reading those chapters) I will talk about variables and other stuff I don’t yet know about. Keep coming back for more stuff about C++.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: