In: Computer Science
Take into account robotic space exploration. Please describe why an engineer would decide to use C or C++ over a higher level language such as Python? What are some benefit an object-oriented language have in comparison to a purely procedural language?
The most popular language in robotics is probably C/C++ (C++ is an object-oriented successor to the C language). ... You can also write your own programs for ROS e.g. in C/C++ or Python. Matlab which is used for data analysis and interfaces with ROS (also, Octave is a free, open-source equivalent to Matlab available here.)
a)python is interpreted whilec++is compiled.
b)python has no primitive everything including the built-in types are object.
c)a python list can hold objects of different types,so each entry has to store additional data about its typethese are several hinder both runtime and memory consumption..
Procedural programming does not have any proper way for hiding data so it is less secure. Object oriented programming provides data hiding so it is more secure. ... In procedural programming, function is more important than data. In object oriented programming, data is more important than function.
The major benefits of object oriented language over purely procedural language are as follows:-
In procedural programming, program is divided into small parts called functions. | In object oriented programming, program is divided into small parts called objects. |
Procedural programming follows top down approach. | Object oriented programming follows bottom up approach. |
There is no access specifier in procedural programming. | Object oriented programming have access specifiers like private, public, protected etc. |
Adding new data and function is not easy. | Adding new data and function is easy. |
Procedural programming does not have any proper way for hiding data so it is less secure. | Object oriented programming provides data hiding so it is more secure. |
In procedural programming, overloading is not possible. | Overloading is possible in object oriented programming. |
In procedural programming, function is more important than data. | In object oriented programming, data is more important than function. |
Procedural programming is based on unreal world. | Object oriented programming is based on real world. |
Examples: C, FORTRAN, Pascal, Basic etc. | Examples: C++, Java, Python, C# etc. |