Programming LanguagesAprogramming language is a formal language that helps us define instructions sothat a machine can produce desired output. A programming language is usually definedfor a computer.
We use programming languages to implement various algorithms.Thehistory of the programming languages can be described in various generations,namely, First, Second, Third, Fourth and Fifth.1) FirstGeneration The firstgeneration programming language came into existence in th 1940s. The computerscan only perceive machine language.
that is there are no changes required inmachine language so as to make the computer understand it. It is a languagethat consists of only 1s and 0s. There are various machine languages, as thelanguage has to written according to the processor of the machine. Every typeof processor has its own requirements when it comes to the machine language. Asa result the machine language is also called machine dependent (also calledhardware-dependent).In the firstgeneration computers, programmers had to use machine language as there was noother option available. Machine language programs have very fast executionspeed and a very efficient use of the primary memory.
Machine language usage isvery tiring, tough and time consuming way of programming. Machine language islow-level language. Since the programmer has to specify every detail of anoperation, a low-level language requires that the programmer have detailedknowledge of how the computer works. It required the programmers to havedetailed knowledge of computer’s design and also about its functioning.Consequently, there were very less programmers and lacked complexity.
Therewere also various problems with 1GL, such as Instructions had to be entered inbinary format, memory had to be manually moved around, the programs in 1GL weretough to debug. IN order to make the task of programming easier, otherprogramming languages have been developed. However, these languages ultimatelyhave to be translated to machine language so that, the computer can understandthe intended meaning of the program.Example:Architecturespecific binary delivered on Switches, PatchPanels and/or Tape. 2) Second GenerationAfterthe first generation programming languages, the second generation ofprogramming languages came into existence in 1950s. The 2GL, also known asAssembly languages, made software development easier and efficient. Assemblylanguages used symbolic addresses and mnemonic operation codes instead of 0 and1s, for the operation codes. Alphabetic abbreviations that are used as memoryaids are called as mnemonic.
As a result abbreviations can be used rather thanhaving to remember lengthy binary codes. Usage of symbolic addressing enablesthe programmer to do desired work without having to remember exact locations ofinstructions or data. These languages consist of 3 elements: Opcodes, Datasections and Directive.Althoughassembly languages are easier to work with, but they also had their limitationsas well. As the programs in assembly language requires a language translatorprogram known as assembler in order to convert the program in machine language.
2GL are also platform specific. The main advantages of 2GL are: efficientprograms are produced that have faster execution. ExamplesAlmostevery CPU architecture has a companion assembly language. Most commonlyin use today are RISC, CISC and x86 as that is what our embedded systems anddesktop computers use. 3) Third generationThethird generation programming languages are the programming languages that weuse in general programming nowadays. The 3GL were introduced in 1950s. They have a vast variety in terms of theirparticular abstractions and syntax. The third generation is also known asHigh-level languages and are procedural languages.
These languages relives theprogrammers from the tiring task of writing programs in comparativelycomplicated machine and assembly languages. Apart from this, programs in 3GLcan be implemented on more than one type of machine with very few changes inthe syntax. The time required to make a program in high-level language islesser in comparison to time required for writing a program in low-levellanguage. The code once written in a 3rd generation language can bereused in some other program. These languages are also driven with desire forreduction in bugs. However, a language translator is still required to convertthe high-level language program into a machine language program becauseultimately the computer understands only machine language.
There are two typeof language translators used for this conversion purpose: compilers andinterpreters.ExampleMost Modern General Purpose Languages suchas C, C++, C#, Java, Basic, COBOL, Lisp and ML.4) Fourth GenerationThefourth generation languages which are also termed to be very high levellanguages were introduce in 1970s. The languages falling under this categoryare non-procedural, because they enable us to specify the only the task to bedone by the computer, without specifying how to perform the task. As a resultprograms in 4th generation programming languages required muchlesser number of statements and produce more efficient results in lesser time. Sinceonly the objective is to be specified, the non-computer professionals can alsodevelop a software. Consequently the users can focus on objective rather thanfocusing on coding intricacies. Apart from this, much less maintenance isrequired as there are fewer errors.
These languages are usually used withdatabase and its data dictionary.ExamplesSQL,SAS, R, MATLAB’s GUIDE, ColdFusion, CSSThereare 5 basic types of 4th generation languages: a) Querylanguages- allows users to retrieve informationfrom database, by firing queries by using specific grammar and syntax.b) ReportGenerators- Similar to query languages, they areused to communicate with a database, but only to generate a report and theycan’t modify the database.c) Applicationgenerators- they allow the user to save the timerequired to design entire software, by creating the required application fromgiven inputs.d) Decisionsupport system and financial planning-These languages allow high level managers to collect data and information andmanipulate it in new ways, with help of special programs and hardware.e) Somemicrocomputer application software- canbe used for creation of specialized applications, some examples are dBase IV,Lotus 1-2-3.
5) Fifth GenerationThefifth generation of programming languages is the group of programming languagesbuild with mind-set of solving the problem by providing the constraints neededto solve them, rather than providing the algorithm for solving it. Asapproaching to an algorithm for solving a problem was a problem in itself,therefore 5GL were introduced in 1990s. With the use of 5GL more emphasis canbe given to the result of the problem. We can also call the 5thgeneration languages as Logical programming language as it works on logic. ExamplePROLOG(PROgramming LOGic), it uses a form of predicate logic to solve queries ondatabase of facts and figures, given by the user.