Search This Blog
Wednesday, January 18, 2012
Getting Closer to Natural Languages
Getting Closer to Natural Languages
Human thoughts originate in its natural form. Natural languages (English, French, Germen, etc.) play the major role in expressing human ideas. Therefore the development of computer languages those closely resemble natural languages was essential to program computers. Such languages are commonly known as High-level languages. Some examples of high-level languages are PL/I, COBOL, FORTRAN, BASIC and Pascal
Today there are more than two thousand high-level languages available for programming computers. Each language has its own objective and structure. For example the BASIC (Beginner’s All purpose Symbolic Instruction Code) and Pascal languages are originally intended to teach computer programming; while COBOL (Common Business Oriented Language) is intended to create business applications such as Payrolls, Stock Control Systems and so on. Some of the primitive high-level languages are being used extensively even today. This is due to the fact that they had been continuously updated to suite the trends in Information Technology. For example the BASIC language was developed in 1965. Since then it has been subjected to many developments and today, its newest version, Microsoft Visual Basic, is used in Rapid Application Development (RAD). In contrast to high-languages, machine language and assembly language are known as Low-level languages.
However, C language is unique among most of the high-level languages. It is neither high-level nor low level. It is rather considered mid-level as it can replace assembly language and still perform high-level operations Once again, a disadvantage of high-level or mid-level languages is the necessity of a translator to translate the program code (source code) into machine code (object code). There are two types of translators used for this purpose; namely an interpreter and a compiler. An interpreter translates one line of code at a time and executes it immediately. An example of a popular interpreter is Microsoft GW-BASIC. Interpreters are more suitable for novice programmers who write small programs and they can run each statement of the code, observing errors and correcting them. Interpreters are not so suitable for large programs where time matters.
A compiler on the other hand reads the whole source code form the beginning to the end and translates it into an object code. Therefore compilers detect errors in advance. An error that encounters in compilation process is known as a compile time error. Such an error has to be corrected and recompiled before the execution. However, after the compilation the object code is available for execution at any time. The advantage of compilation is that, the compiled code is very compact and runs fast. The disadvantage is that, each time an error is corrected it has to be recompiled.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment