Programming language: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Paul Derry
No edit summary
imported>Paul Derry
(I made a few adjustments. :))
Line 1: Line 1:
A '''programming language''' is a human readable lexicon and grammar of instructions that a [[programmer]] uses to instruct a computer how to behave.
A '''programming language''' is a humanly readable lexicon and grammar that a [[programmer]] uses to instruct a computer how to operate.


Programs written in a programming language typically have to be translated into a code the central processing unit ([[CPU]]) can understand and execute [[machine code]]. The programming language allows the programmer to define [[data structure]]s and combine them with logic and procedural instructions. Generally a programming language reflects the state of development of the hardware and its processing power.
Programs written in a programming language have to be translated into a code (directly, or indirectly through an interpreter) the central processing unit ([[CPU]]) can understand and execute [[machine code]]. The programming language allows the programmer to define [[data structure]]s and combine them with logic and procedural instructions. Generally a programming language reflects the state of development of the hardware and its processing power.


Programming languages can generally be divided into two categories:
Programming languages can ''generally'' be divided into two categories:


'''Compiled''' languages must first be translated by a '''[[compiler]]''' from human readable [[source code]] to an [[object code]]. A '''[[linker]]''' is often applied to this code to assemble it with existing libraries and runtime environments into a form the computer can run.
'''Compiled''' languages must first be translated by a '''[[compiler]]''' from human readable [[source code]] to an [[object code]]. A '''[[linker]]''' is often applied to this code to assemble it with existing libraries and runtime environments into a form the computer can run.  


'''Interpreted''' languages rely on an application, the '''[[interpreter]]''', that translates the (sometimes human readable) source code into machine code through pre-existing interfaces. For example, an interpreter would read a line such as this: <code>PRINT "Cookies are yummy!"</code> and call the predefined, '''platform independent''' function <code>PRINT</code> inside the interpreter itself where the interpreter then executes the '''platform dependent''' [[function call]].
'''Interpreted''' languages rely on an application, the '''[[interpreter]]''', that translates the (sometimes human readable) source code into machine code through pre-existing interfaces. For example, an interpreter would read a line such as this: <code>PRINT "Cookies are yummy!"</code> and call the predefined, '''platform independent''' function <code>PRINT</code> inside the interpreter itself where the interpreter then executes the '''platform dependent''' [[function call]] that corresponds with <code>PRINT</code>.
 
The division between compiled languages and interpreted languages tends to be fuzzy and is by no means a rule. A good rule of thumb is that if a programmer writes code in a language that uses another application to run the program then the language is interpreted. If the programmer writes code in a language that uses another application to compile the code and the program can be run natively then the language is compiled.


==See Also==
==See Also==

Revision as of 16:59, 26 April 2007

A programming language is a humanly readable lexicon and grammar that a programmer uses to instruct a computer how to operate.

Programs written in a programming language have to be translated into a code (directly, or indirectly through an interpreter) the central processing unit (CPU) can understand and execute machine code. The programming language allows the programmer to define data structures and combine them with logic and procedural instructions. Generally a programming language reflects the state of development of the hardware and its processing power.

Programming languages can generally be divided into two categories:

Compiled languages must first be translated by a compiler from human readable source code to an object code. A linker is often applied to this code to assemble it with existing libraries and runtime environments into a form the computer can run.

Interpreted languages rely on an application, the interpreter, that translates the (sometimes human readable) source code into machine code through pre-existing interfaces. For example, an interpreter would read a line such as this: PRINT "Cookies are yummy!" and call the predefined, platform independent function PRINT inside the interpreter itself where the interpreter then executes the platform dependent function call that corresponds with PRINT.

The division between compiled languages and interpreted languages tends to be fuzzy and is by no means a rule. A good rule of thumb is that if a programmer writes code in a language that uses another application to run the program then the language is interpreted. If the programmer writes code in a language that uses another application to compile the code and the program can be run natively then the language is compiled.

See Also

List of programming languages