Programming language: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Pat Palmer
No edit summary
imported>Pat Palmer
(adding headers)
Line 1: Line 1:
A '''programming language''' is a human-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 [[machine code]].  Machine code consists of multiple lower-level instructions which the computer can actually understand. Use of a programming language allows programmers to work at a higher level than machine code (which is not human-readable).
A '''programming language''' is a human-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 [[machine code]].  Machine code consists of multiple lower-level instructions which the computer can actually understand. Use of a programming language allows programmers to work at a higher level than machine code (which is not human-readable).


=Language categories=
==Compiled vs. interpreted==
One way in which various programming languages have traditionally been categorized is as [[compiler|compiled]] vs. [[interpreter|interpreted]] languages.  The traditional view was that ''compiled'' languages were first translated, by a ''compiler'' program, from human-readable [[source code]] into [[binary numeral system|binary]] [[machine code]]. Conversely, ''interpreted'' languages relied, at run time, on a special runtime application, called the ''interpreter'', to translate [[source code]] line by line into [[machine code]] during program execution.  However, the division between compiled languages and interpreted languages has blurred with the advent of hybrid platforms such as [[Java programming language|Java]] and the .NET framework ([[C sharp|C#]] and [[Visual Basic .NET|VB.NET]]).  These hybrid languages require sophisticated, optimized "runtime" engines to execute, and the runtime engines use Just-In-Time compilers to generate native machine code (but not on a line-by-line basis as in traditional "interpreters").
One way in which various programming languages have traditionally been categorized is as [[compiler|compiled]] vs. [[interpreter|interpreted]] languages.  The traditional view was that ''compiled'' languages were first translated, by a ''compiler'' program, from human-readable [[source code]] into [[binary numeral system|binary]] [[machine code]]. Conversely, ''interpreted'' languages relied, at run time, on a special runtime application, called the ''interpreter'', to translate [[source code]] line by line into [[machine code]] during program execution.  However, the division between compiled languages and interpreted languages has blurred with the advent of hybrid platforms such as [[Java programming language|Java]] and the .NET framework ([[C sharp|C#]] and [[Visual Basic .NET|VB.NET]]).  These hybrid languages require sophisticated, optimized "runtime" engines to execute, and the runtime engines use Just-In-Time compilers to generate native machine code (but not on a line-by-line basis as in traditional "interpreters").
<!--A '''[[linker]]''' is often applied to this code to assemble it with existing libraries and runtime environments into a form the computer can run.-->
<!--A '''[[linker]]''' is often applied to this code to assemble it with existing libraries and runtime environments into a form the computer can run.-->


==High-level vs. low-level==
Another way in which programming languages are sometimes categorized is into "high-level" versus "low-level" languages.  "High-level" programming languages have one high-level command or statement corresponding to many [[machine code]] instructions.  "Low-level" programming languages, including especially [[assembler]]s, may have approximately one human-readable instruction for [[binary numeral system|binary]] machine instruction.  A "high-level" language may also sometimes be called "low-level" if it permits a programmer to perform certain (possibly risky) hardware or [[operating system]] operations.  [[C programming language|C]] is technically "high-level" but is sometimes regarded as "low-level" as well because it imposes little, if any, restrictions on what a programming can do in terms of accessing the computer's raw hardware capabilities.
Another way in which programming languages are sometimes categorized is into "high-level" versus "low-level" languages.  "High-level" programming languages have one high-level command or statement corresponding to many [[machine code]] instructions.  "Low-level" programming languages, including especially [[assembler]]s, may have approximately one human-readable instruction for [[binary numeral system|binary]] machine instruction.  A "high-level" language may also sometimes be called "low-level" if it permits a programmer to perform certain (possibly risky) hardware or [[operating system]] operations.  [[C programming language|C]] is technically "high-level" but is sometimes regarded as "low-level" as well because it imposes little, if any, restrictions on what a programming can do in terms of accessing the computer's raw hardware capabilities.


==General purpose vs. special purpose==
A third categorization for programming languages is whether the language is "general purpose" or "special purpose".  A language is considered general-purpose if any program at all can be coded in the language.  Conversely, if the language is targeted towards making certain kinds of things possible, but does not do everything that other languages might, it is considered "special purpose".  Examples of general-purposes languages are C, Java and C#.  An example of a special-purpose programming language is SQL (used to interact with [[database]] programs).
A third categorization for programming languages is whether the language is "general purpose" or "special purpose".  A language is considered general-purpose if any program at all can be coded in the language.  Conversely, if the language is targeted towards making certain kinds of things possible, but does not do everything that other languages might, it is considered "special purpose".  Examples of general-purposes languages are C, Java and C#.  An example of a special-purpose programming language is SQL (used to interact with [[database]] programs).


==See Also==
==Markup languages==
(to be written); examples: HTML, Postscript
 
=See Also=
[[List of programming languages]]
[[List of programming languages]]
=References=
<references />


[[Category:Computers Workgroup]]
[[Category:Computers Workgroup]]
[[Category:CZ Live]]
[[Category:CZ Live]]

Revision as of 18:50, 26 April 2007

A programming language is a human-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 machine code. Machine code consists of multiple lower-level instructions which the computer can actually understand. Use of a programming language allows programmers to work at a higher level than machine code (which is not human-readable).

Language categories

Compiled vs. interpreted

One way in which various programming languages have traditionally been categorized is as compiled vs. interpreted languages. The traditional view was that compiled languages were first translated, by a compiler program, from human-readable source code into binary machine code. Conversely, interpreted languages relied, at run time, on a special runtime application, called the interpreter, to translate source code line by line into machine code during program execution. However, the division between compiled languages and interpreted languages has blurred with the advent of hybrid platforms such as Java and the .NET framework (C# and VB.NET). These hybrid languages require sophisticated, optimized "runtime" engines to execute, and the runtime engines use Just-In-Time compilers to generate native machine code (but not on a line-by-line basis as in traditional "interpreters").

High-level vs. low-level

Another way in which programming languages are sometimes categorized is into "high-level" versus "low-level" languages. "High-level" programming languages have one high-level command or statement corresponding to many machine code instructions. "Low-level" programming languages, including especially assemblers, may have approximately one human-readable instruction for binary machine instruction. A "high-level" language may also sometimes be called "low-level" if it permits a programmer to perform certain (possibly risky) hardware or operating system operations. C is technically "high-level" but is sometimes regarded as "low-level" as well because it imposes little, if any, restrictions on what a programming can do in terms of accessing the computer's raw hardware capabilities.

General purpose vs. special purpose

A third categorization for programming languages is whether the language is "general purpose" or "special purpose". A language is considered general-purpose if any program at all can be coded in the language. Conversely, if the language is targeted towards making certain kinds of things possible, but does not do everything that other languages might, it is considered "special purpose". Examples of general-purposes languages are C, Java and C#. An example of a special-purpose programming language is SQL (used to interact with database programs).

Markup languages

(to be written); examples: HTML, Postscript

See Also

List of programming languages

References