Sunday, February 19, 2017

Intro to Programming: C++

By Xavier Reinders

Contrary to the title C++ is not the language you should be learning if you are looking for an introduction into the world of programing. While it was the first full programming language I learned it is more often used by schools in an upper level course after students have already learned some introductory programing. The language was created in 1983 by Bjarne Stroustrup with an emphasis on efficiency and performance.

C++'s creator on the 'advantages' of his language
The efficiency part of C++ does not come on the coding end of things but rather on the computing end, so while there is often more work for the programmer, there is much less for the computer or system, ideal for large systems or programs. C++ is often referred to as a mid to low level programming language, these levels denote closeness to machine language, the stuff computers use to communicate and operate.  Since it is a mid to low level language it is closer to the ones and zeros used by the machines which means it is sometimes a bit tricky and difficult for humans to understand. However this human inconvenience allows for a much faster and efficient system using only a few more ones and zeros than are necessarily needed to tell a machine something.

C++'s biggest advantage is rooted in its memory manipulation abilities and its use of pointers and references. One of the biggest memory pit falls of other languages is their use of copies, when passing around information between places they make a copy of that data each time it goes somewhere new. As you might imagine this can quickly take up a lot of space, so C++ approaches this problem differently using pointers and references. Although they are often very complex to implement the concepts behind these two things is pretty simples. Pointers are like a trail sign or a highway sign, they tell you where and what something is in a place totally separate from the original thing. References are like nicknames for a person,  like 'Bill' and 'William', they both mean the same thing and refer to the same person its just 2 different ways of saying it.

I hope this has introduced you to some of the differences between C++ and other languages. If you are interested in programming I would recommend a higher level language like python first, which can be found here. However if C++ is really what you want this site can help you get started into the language.

No comments:

Post a Comment