C++ was created by Bjarne Stroustrup in the year 1979. Stroustrup designed this language while he was "working for AT&T Bell Labs, which eventually packaged and marketed it." Stroustrup released his book, "The C++ Programming Language" in 1986 and "after the release of Version 2.0 in 1989, C++ programming language was rapidly acknowleged as a serious, useful language." (Ezust, 2012).
There are many features in the C++ programming language. SOme of the most important ones are explained below. C++ is machine independent/portable. C programs in general "can be executed in many machines with little bit or no change. However, that does not make it platform-independent." Another feature is that it is a mid-level programming language. C++ is "used to develop system applications such as kernel, driver, etc. It also supports the feature of high level language," which is what makes it a mid-level language. Another feature of C++ is its memory management. With C++, it is able to "support the feature of dynamic memory allocation...and we can free the allocated memory at any time by calling the free() function." C++ also has the pointer feature. With this, the user can "directly interact with the memory by using the pointers." Pointers are used for memory, structures, functions, array, and more. Lastly, it is a compiler based programming language. This means that "without compilation no C++ program can be executred...so first we need to compile our program using compiler and then we can execute our program" ("C++", 2011).
Also known as procedure or subroutine in other languages, we are now going to talk about the functions in C++ programming language. There are two different functions in this programming language. There is the library functions and the user-defined function. The library functions "are declared in the C++ header files such as ceil(x), cos(x), exp(x), etc." The user-defined functions are "functions which are created by the C++ programmer, so that they can user it many times. It reduces complexity of a big program and optimizes the code." ("C++",2011).
Not to be confused with the deadly snake, Python is a relatively new programming language. It was released by Guido Van Rossum in the year 1991. Guido Van Rossum was working for CWI (Stichting Mathematisch Centrum) when he developed the language. The name of the programming language does not come from the name of the infamous reptile. Python "...got its name from a BBC comedy series from the 1970s, 'Monty Python's Flying Circus'." Guido Van Rossum was a fan of the Monty Python series and he was looking for a name that was "short, unique, and slightly mysterious," ("The Python Programming Language", 1997) so he chose the name Python.
There are many features in the Python programming language. Written below are few of the important ones. One of the biggest features is that this programming language is very simple. Some people say that "reading a good Python prgram feels almost like reading English, although very strict English. The pseudo-code nature of Python is one of its greatest strengths." The simplicity of this program "allows the user to concentrate on the solution to the problem rather than the language itself." Another feature of this programming language is that it is free and open source. This means that "you can freely distribute copies of this software, read its source code, make changes to it, use pieces of it in new free programs, and that you know you can do these things." Due to it being an open source program, "its has been created and constantly improved by a community who just want to see a better Python." Another feature of this language is that it is interpreted. Unline C++ which is a compiled language, "Python does not need compilation to binary. You just run the program directly from the source code." Python has the ability to switch the source code into bytecodes "...and then translates this into the native language of your computer and then runs it." This makes the user's life much easier beacause they will not have to "...worry about compiling the program, making sure that the proper libraries are linked and loaded, etc." Lastly, Python is a high-level language. This means that while writing Python programs, "you never need to bother about the low-level details such as managing the memory used by your program, etc." ("A Byte of Python", n.d.).
Having functions in programming languages is a very common thing. Python has two different types of functions. There are built-in functions and user-defined functions. Built-in functions are "...part of Python packages and libraries, whereas user-defined functions are written by the developers to meet certain requirements." User-defined functions in Python mean that "...they only need to be written once, but they can be used multiple times." (Pal, 2016).
2. Ezust, Alan. "A Brief History of C++." ICS.com, 2 Mar. 2012, https://www.ics.com/designpatterns/book/history.html.
4. Pal, Kaushik. "User-Defined Education in Python." Codementor Community, 19 Jun. 2017, https://www.codementor.io/kaushikpal/user-defined-functions-in-python-8s7wyx8k2.
5. "C++." Java T Point, 2011, https://www.javatpoint.com/cpp-functions.
7. "Features of Python." A Byte of Python, n.d., https://www.ibiblio.org/g2swap/byteofpython/read/features-of-python.html.
8. "The Python Programming Language." Python, 9 Dec. 1997, https://groups.engin.umd.umich.edu/CIS/course.des/cis400/python/python.html.