I "revived" this article of mine wrote a little 'of years ago. I slightly revised, updating a little bit here and there, but I think it is still relevant and interesting.
INTRODUCTION
What is a development language? A computer, aka PC (Personal Computer), has a personal language. This language is called machine code, to mean that every machine, so any computer (PC compatible, Apple, Unix, etc ...), has a unique and proprietary. The programs that we see "run" on our PCs are mainly carried out by the mysterious object called a microprocessor. This is the heart, the intelligent module, each computer. In fact, only one application is not running but is supported by the microprocessor, so to speak, to what is called an operating system: a software layer supplied by the manufacturer of the machine (see, for example, the Apple Macintosh). The PC compatible, for example, which feature the famous Pentium microprocessor may have various Windows operating system as provided by the Redmond company of Bill Gates' Microsoft (Windows 95, 98, 2000 ... etc.) and, lately, even alternative operating systems completely free like Linux and derivatives. An application, therefore, must be written for a particular operating system rather than a particular processor. This is because the software is written today stands at a level higher than the machine itself (its hardware).
In addition, the operating system provides a number of features to simplify the developer's life that should not, therefore, start from scratch in the drafting of a program.
Programming languages such as C, Pascal, Assembly, have been invented to bring the mode of expression human beings the way in which, instead, "thinks" a computer.
THE ASSEMBLY LANGUAGE
Assembly language was the first step to make life easier for developers. The machine code, the language of the microprocessor, the beginning was the only way to write "simple" application. The coding was done through the insertion of "instructions" that were nothing more than numbers: 21, 45, 77. The significance of these numbers was documented in so-called Data Sheet: documents issued by the manufacturer of microprocessor instructions which were listed as possible, their function and other importatati information. The numeric keypad was the only thing that served to the developer. With the advent of the Assembly, at last, he was able to tie these numbers in order to speed up the initials of the coding. To take a simple example, imagine having to load a given, for example 1, in a variable, and add the value 5, then exit. This was the principle:
1 2 3 | 46 01, office 1 34 05, add 5 96; out |
Assembly resulted in all the more understandable:
1 2 3 | LDA # 1; 1 accumulator charging ADDA # 5, the accumulator adds 5 RTS; out |
Had therefore been "invented" the first programming language. A language still "very low", so very close to machine code, which, however, gave a higher reading of the code. The invention of language meant nothing other than the creation of a special program that can translate "words" (or instructions) as LDA in numbers.
This program was given the name of the compiler.
THE COMPILER
The compiler is a software that can translate a text written in a language into machine code. All applications, regardless of what language they are written to run on a computer must be "translated" into machine code or, more simply, in the Assembly. The purpose of a compiler is therefore to translate the acronyms (or instructions) in numbers. There are, in fact, assembly compilers, C compilers, Pascal compilers, etc. ... A language is always tied to a compiler and a compiler is tied to a machine. This means that in order to develop assembly language, a compiler is not enough to acquire any assembly but, rather, a compiler for the machine assembly - and operating system - which will run our application.
Exist, then intermediate sections, labeled with the name of interpreters. These, in short, are like the compilers with the difference that perform the conversion operation (from education to machine code) "on the fly", without any physical then generate executable file. Examples of this type, very popular at one time, are the Basic Commodore 64! Even today, under various guises, the interpreters play a vital role; Java, Flash Player or Adobe AIR, are all examples - in fact - as a performer.
Code portability
Assembly language was certainly a step in the programming, but still we are far from the languages we're used to today. One of the problems of Assembly is a non-portable code.
For code portability means the ability of a source - that is this:
1 2 3 | LDA # 1; 1 accumulator charging ADDA # 5, the accumulator adds 5 RTS; out |
to be re-compiled, as it is (or with minor modifications) on another machine (operating system) without changing the code, assuming that you have the compiler for that machine and the operating system.
Different machines have, probably, different machine code. This means that the instruction LDA , which takes the value 46 converted, it makes sense on a particular machine, but not on another. The Assembly, being connected to the microprocessor, simplified development only for the microprocessor. When you had to bring an application on another microprocessor was, in effect, rewrite the entire code. All this has become, over time, unacceptable. And that was how it began to develop compiler-based languages that in some way regardless of the type of microprocessor.
AFTER THE FU B C
Let's skip the legends, the preambles and introductions from the classic book. If you want to smile and soak in the golden age of computing, you can go to the library and make a large stock of books on C language I, however, I shall focus on the essence of the C language
C is definitely the most well-known programming languages, the most used and abused. Between the age of Assembly and C was found years of testing, changes, appearances and disappearances of other languages. C has been successful because it had everything that seemed to be missing at that time. It, unlike the Assembly, it is completely invented, in the sense that it is the result of the study and imagination of two "simple" programmers. The Assembly, as we have seen in previous sections, is closely linked to the microprocessor. His instructions, keys, or syntactic, are - unintentionally - indicative of the microprocessor used:
Microprocessors 6502
1 2 3 | LDA # 1; 1 accumulator charging ADDA # 5, the accumulator adds 5 RTS; out |
Microprocessors Intel 80 × 86
1 2 3 | , # 1 ;carica 1 nel registro a 16 bit AX MOV AX, # 1, 1 charged in 16-bit register AX , # 5 ;aggiunge 5 al registro AX ADD AX, # 5, adds 5 to the AX register RET; out |
Microprocessors Motorola 680 × 0
1 2 3 | D0 ;carica 1 nel registro D0 MOVEQ # 1, D0, D0 in the register office 1 D0 ;aggiunge 5 al registro D0 ADDQ # 5, D0, D0 adds 5 to register RTS; out |
In summary, although there is a compiler that this Assembly can not be considered a real programming language. In fact, if we take the source assembly written for Motorola 680 × 0 and try to compile with the compiler for Intel microprocessors, a series - infinite - of Syntax Error we will immediately change my mind! The Assembly, therefore, unlike the C compiler is an anomaly. Rather than "assembly language" we speak of a "tool that can simplify the machine code" - code numbers in the previous paragraphs.
The C language
The C language is the most common, there is no computer in the world that has not its C compiler No coincidence that the C language on which was the object-oriented programming has had and is having, his best gym. The C language is the true prototype portable: the same source can be compiled on different machines without having to change one line of code. The practice, unfortunately, tells us that in certain cases, this portability vanishes as if by magic. But the fact remains that C has its own syntax, has a standard recognized around the world. C is a development language. The texts that deal with are in fact released from the machine on which to perform the exercises. If you go to the bookstore and buy a text - even college - the C language, you will notice that there are references to the environment on which to perform the exercises. Maybe some text can emphasize that the example has been compiled on this machine and this environment, but it is irrelevant to most readers. The interesting thing is that everyone can verify the code to "home" without having to possess such a machine or the operating system. All this, of course, remains valid in the general area, but when you go into detail there are constraints both machines operating systems.
C A good book for those who are beginners, it is a generic text in that language is not its particular application. Who's got the basics of C language can improve - or specialize - his knowledge of particular applications of C. If you have never developed software and in addition to C ever, avoid, for example, to buy books as Microsoft C Language! I think it is obvious that the text is aimed at giving information about the environment of development of the house - Microsoft - and not on C itself. I would not be surprised at some the question, "but C did not invent Microsoft?». No! Microsoft, in fact, invented nothing, at least compared to its predecessors. But that's another story ...
In addition, many languages used today are nothing more than the evolution of C itself, or at least offer a basic syntax very similar - if not identical - to the C! The C, then, is the mother of many new technologies. JavaScript, PHP, Actionscript, Java, and others, although they are in fact object-oriented languages, the syntax of C have the 60!
OBJETCT ORIENTED LANGUAGES
What is Object Oriented languages? It may be difficult to answer this question given that confusion and misunderstanding are common in this area. I would start with the stress that the object-oriented programming is, first of all, a philosophy. Who develops object does not only change but also the way the compiler to analyze the problem. In object oriented programming philosophy changed radically and there is no real main stream as in classical structured programming. Developing products with object-oriented (Visual Basic, C + +, Java, ...) can be confusing not just ideas to those who have a solid foundation of old programming. The C + +, for example, must be dealt with only by those who have a good preparation of standard C. In object-oriented programming, more than in the structured finish the project is not imported, but being able to accomplish in a very particular way.
Our overview of the development languages ends here. For further information you can make an explicit request by contacting the author. The development languages available today are varied and are often chosen according to particular needs. A developer, therefore, must be able to develop in any language, focusing on one or more development tools needed. Today, what is lacking to some developers, is the concept of programming in its essence. Knowing C is very different from knowing how to program in C!










There are no comments for this post
Leave a comment