Tuesday, May 21, 2013
Visual Basic and C++ Comparison Essay
Data are statistics obtained through the compilation of facts and factors, being stored into the computer through electric signals which are to be recorded by mechanical recording media in binary code. A program is a set of coded instructions used to compile and organize data, where it generates data by the facts and factors in accordance to the program, where these set of coded instructions are assembled via programming languages.
Programming languages are synthetic languages that are specifically designed for the purpose of interaction between the machine and the user, allowing the users to input algorithm and rules into the program in order to perform tasks. Over the generations, programming languages had advanced more and more in technology hence, enabling the programs to complete complex tasks with ease and also, loosening the dependency of the programs on human. [1]
It all begun with binary code upon the invention of the first computer in the first generation of programming language. These codes are in the simplest form of computer language containing only the notations “1”’s and “0”’s. Machine language can be processed by the computer directly without any decoding. Followed by assembly language, it contains human readable symbols that are processed by an assembler that translates the notations into machine language. Although the notations used are hard to understand, the language is still easier to be mastered than machine language.
Third generation programming language, also known as procedural language, contains short series of words representing commands. Closer to human language, it makes high-level programming possible and easier. Subsequently, fourth generation programming language is invented. This programming language is goal-orientated as it only specifies in a very small pool of applications such as to access databases. The fifth generation programming language involves a visual or graphical interface for creating codes, also known as natural language. [2]
C++ comes from the third generation of programming languages with most of its terms like “string”, “int”, “cin” and “cout” similar to human language. It is also often referred as a middle-level computer language, as it takes the features of the higher-level programming language such as the concept of data types, a set value or variable that can be stored in the program temporarily, but maintains the control and flexibility of basic programming languages, by allowing the conversion of bulk codes into bits and bytes, and compact with a wide variety of operating system, in other words, making it portable. Being a structured language, it also allows a wide range of programming prospects, allowing easy prototyping as it enables the programmer to relate the program language to real-life situations with ease through the loose rule of the program language on the placement of statements in a code, supporting several loops construct too. [3]
However, the terms of programming language used in C++ are complex and requires a significant amount of time to be mastered as the programmer is required to memorize the sequences and the names of the commands. Moreover, C++ does not provide run-time checking on the code which makes it harder to identify errors in a code as the program develops. [4] [5]
Visual Basic is a fifth generation programming language created by Microsoft which contains a user interface although it is a further developed version of BASIC, a third generation programming language. It is an event-based program that manipulates or changes its flow accordingly to the list of happening events in such examples, mouse-clicks and key presses. With the simple coding and interactive programming interface of Visual Basic, it is easy to understand and master for beginners, at the same time allowing the professionals to develop complex programs by combining the simple codes. It promotes rapid application development by the exemption of the deciphering of complex terms while programming and with the help of project wizards that includes pre-set templates designed to fulfill the application in situations. [6] [7]
Thus, the simplicity of the Visual Basic programming language has caused it to have a large talent pool due to the easiness of it to be mastered, giving heavy competitions between the programmers. Besides, the usage of graphical interface takes up more amount of memory as it requires more amount of processing. Due to the program being designed by Microsoft, it also decreases its portability as it is only compatible with Windows OS. [7]
Despite of C++ and Visual Basic being developed through very different percepts, Microsoft had developed both programming language to be supported by the same .NET framework development platform, where they are assembled by the same intermediate language (IL), the compilers of the following languages. [8]
In terms of language structure, both languages are developed in reference to the basic features and requirements of the same framework to increase their functionality so that they could be translated with one another through a simple syntax converter. In result, there is an equivalent substitute of commands that are present in C++ in VB. Both languages are similar to each other as both of them are products of the further developing of the third generation programming language.
Thus, having the same origins of the generations in programming language, C++ and Visual Basic do not come from the same origins of programming language, with BASIC for Visual Basic and C for C++ respectively. Consequently, both programming languages still have differences among one another.
C++ and Visual Basic falls under different generations after being modified from its original generation. Visual Basic falls under the category of the fifth generation programming language due to its introduction of graphical user interface, as it allows the user to “draw” the program onto the interface while C++ still remains in the third generation programming language being only partially object orientated after its mere upgrade on classes and enhanced functions of C, remaining in the form of coding.
Likewise, C++ is a case-sensitive programming language where the commands are different with the usage of case-sensitive letters in the coding which does not comply with Visual Basic coding. For example, in Visual Basic, the meaning of the term “Example” and “example” are the same whereas in C++, “Example” and “example” represents two different variables.
Besides of that, they have different language features corresponding to different usage of keywords. For example, the introduction of loop in a program for Visual Basic requires the insertion of the statement:
For counter As Integer = 0 To final
'vb.net code
Next
While C++ requires the insertion of the code:
cout << n << ", ";
--n;
The coding in C++ is based more on notations and symbols, where the example coding brings out the meaning of printing the value of n, later on decreasing n by 1, compared to the easily understandable language of Visual Basic. It is also noted that C++ requires a semicolon “;” after each string of command as an indication to the computer for ending the command.
There are some difference of features too between C++ and VB.net where it unlike C++’s multi-platform compatible language, the single compatibility of programming language only on a single type of platform in VB.net provides the programing language a higher security. Similarly, Visual Basic provides run-time checking which identifies mistakes and errors in the coding while C++ does not. However, with C++’s wide range of compatibility, it enables the insertion of unsafe codes via unsafe keywords which enables the user to explore and discover new coding techniques.
C++ also supports the feature of multi-lined comments in the code while Visual Basic doesn’t, which means that C++ allows more information to be inserted into the coding with the ease of the programmer while Visual Basic has no features of this kind. [9]
Both of the programming language has its own pros and cons where there are some features that cannot be supported in the other programming language and vice versa. In the end, upon the comparison between C++ and Visual Basic, the decision of which is the better programming language could not be made as they fall in totally different categories of programming. C++ is specially designed for advanced programming such as the creation of video games while Visual Basic is created for the programming of programs containing user-interfaces such as Windows by matching the structure of the program through the user-interface present in VB itself.
In conclusion, instead of separating the programming languages into competing individuals, why not combine the both programming language together to achieve a higher goal? The cons of the programming language are overcome by one another. With the application of C++ in Visual Basic is allowed, providing flexibility at the same time, efficiency due to the swiftness of programming with the user-interface. Hence, these programming languages should be used as applicants in one another for the sake of development in further programming languages, aiming towards the goal of the collection of more data and for it to be more organized.
Bibliography
1. "Learning Area 5: GENERATIONS OF PROGRAMMING LANGUAGE (Lesson 2)." Learning Area 5: GENERATIONS OF PROGRAMMING LANGUAGE (Lesson 2). N.p., n.d. Web. 19 May 2013.
2. "C -complete Reference (3rd Ed.)." C -complete Reference (3rd Ed.). N.p., n.d. Web. 19 May 2013.
3. "Advantages Of C Language,Disadvantages Of C Language." Advantages Of C Language,Disadvantages Of C Language. N.p., n.d. Web. 19 May 2013.
4. "Introduction." Introduction. N.p., n.d. Web. 19 May 2013.
5. "Disadvantages Of C Language ~ Java." Disadvantages Of C Language ~ Java. N.p., n.d. Web. 19 May 2013.
6. "What Is Visual Basic?" About.com Visual Basic. N.p., n.d. Web. 19 May 2013.
7. Gitonga, David. "Advantages and Disadvantages of VB.NET | EHow." EHow. Demand Media, 21 June 2011. Web. 19 May 2013.
8. "Microsoft Converging Programming Languages." InfoWorld. N.p., n.d. Web. 19 May 2013.
9. "C# and VB.NET." C# and VB.NET. N.p., n.d. Web. 19 May 2013.
Labels:
Technology Year 11
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment