Changes

Jump to navigation Jump to search
1,092 bytes added ,  21:59, March 6, 2012
→‎Implementation of programming lLanguages: spelling in section title; reword section
Line 41: Line 41:  
There are a variety of different programming paradigms (styles of writing programs). Some programming languages really only support a single paradigm while others may support several. Declarative programming has already been mentioned above.  Other paradigms include: procedural, functional, event-driven, object-oriented and automata-based.
 
There are a variety of different programming paradigms (styles of writing programs). Some programming languages really only support a single paradigm while others may support several. Declarative programming has already been mentioned above.  Other paradigms include: procedural, functional, event-driven, object-oriented and automata-based.
   −
==Implementation of programming lLanguages==
+
==Implementation of programming languages==
−
A set of instructions written in a programming language is called '''source code''', or simply '''code'''.  In order for a computer to execute a program, another program must be used to prepare the source for execution.  '''Interpreters''' translate the source code into '''machine code''' as the program executes.   '''Compilers''' and '''Assemblers''' convert the source code into machine code once, and the computer can run the machine code any number of times. This makes compiled code run faster than interpreted code, usually by a factor of about 10.
+
A program as written by a programmer in some programming language is said to be in the form of '''source code'''.  Such source code can not be used as is, but must first be processed by another program before it can be used on a computer.
 +
 
 +
In the case of assembly language the processing program is called an '''assembler'''; this has a relatively simple task since the instructions coded by the user correspond almost exactly to the actual machine code instructions to be used. The entire program is assembled prior to use.
 +
 
 +
There are three types of program for dealing with high-level programming languages:
 +
* '''compiler''', which converts the entire program to machine code prior to use.
 +
* '''interpreter''', which examines the source program line by line, works out what has to be done and does it.
 +
* translation to some '''intermediate code''', which can then either be interpreted or converted to machine code on the fly.
 +
 
 +
Programs which have been completely converted to machine code prior to use may easily run 10 times faster than programs which are interpreted.
 +
 
 +
There are no fixed rules as to which programming languages are processed in which way, and indeed most languages can be handled in any of these three ways. Many languages have been implemented in two or more of these ways. Traditionally compilers have been used for languages where performance is important (e.g. Fortran, '''C'''), interpreters have been used for languages where convenience of use is important (e.g. most scripting and command languages), and translation to intermediate code has been used when machine-independence is considered to be important (e.g. Java).
    
==Language List==
 
==Language List==
SkipCaptcha
265

edits

Navigation menu