Computer language

The term computer language includes a large variety of languages used to communicate with computers. It is broader than the more commonly-used term programming language. Programming languages are a subset of computer languages. For example, HTML is a markup language and a computer language, but it is not traditionally considered a programming language. Machine code is a computer language. It can technically be used for programming, and has been (e.g. the original bootstrapper for Altair BASIC), though most would not consider it a programming language.
Characteristics of Computer Language
Computer languages can be divided into two groups: high-level languages and low-level languages. High-level languages are designed to be easier to use, more abstract, and more portable than low-level languages. Syntactically correct programs in some languages are then compiled to low-level language and executed by the computer. Most modern software is written in a high-level language, compiled into object code, and then translated into machine instructions.
Computer languages could also be grouped based on other criteria. Another distinction could be made between human-readable and non-human-readable languages. Human-readable languages are designed to be used directly by humans to communicate with the computer. Non-human-readable languages, though they can often be partially understandable, are designed to be more compact and easily processed, sacrificing readability to meet these ends.

Types of Computer Language
Programming languages are the primary means by which developers of computing systems instruct a machine to organize or manipulate information or control physical devices. Most software is written using one or more programming languages. Common examples include C++, Java, BASIC, and assembly languages, but this is by no means an exhaustive list. Programming languages can be grouped by "generation", see also Fourth-generation programming language ("4GL")
Scripting languages are a type of programming language designed to control other software or to coordinate the actions of multiple software applications. They are usually distinguished from "full" programming languages in that they are dependent on another application, are more accessible to users, include fewer features, and are not compiled but run via an interpreter. In practice, some languages originally conceived for scripting (PHP) have grown to be become "full" programming languages and some "full" programming languages have been adapted for embedding into applications (Java). Common examples include Perl and javaScript. (scripting language list)
Most programming language are based on a programmer writing source code to instruct the computer, but Visual programming languages are designed to have the programmer manipulate visual representations of program elements.
All instructions to a computer are ultimately expressed in machine code, a non human-readable binary computer language which corresponds to the available instructions for a microprocessor. Source code is converted to machine code by a compiler, sometimes on the fly). Some programming languages use an intermediate computer language called bytecode which is designed to make software more portable across different computer architectures. Such systems use a virtual machine to convert bytecode to machine code when a program is run. Java is a well-known example.
Languages for representing information
• Query language (e.g., SQL, XQuery)
• Markup languages (e.g., HTML - typically used for producing documents)
• Transformation languages (e.g., XSLT)
• Template processing languages
• Category:Data serialization formats
Languages for describing software behavior
• Configuration file formats (e.g., INI file)
Languages for designing systems
• Specification languages
• Hardware description languages
High-level programming language
A high-level programming language is a programming language that, in comparison to low-level programming languages, may be more abstract, easier to use, or more portable across platforms. Such languages often abstract away CPU operations such as memory access models and management of scope.
Features
The term "high-level language" does not imply that the language is always superior to low-level programming languages - in fact, in terms of the depth of knowledge of how computers work required to productively program in a given language, the inverse may be true. Rather, "high-level language" refers to the higher level of abstraction from machine language. Rather than dealing with registers, memory addresses and call stacks, high-level languages deal with variables, arrays and complex arithmetic or boolean expressions. In addition, they have no opcodes that can directly compile the language into machine code, unlike low-level languages like assembly language. Other features such as string handling routines, object-oriented language features and file input/output may also be present.
Abstraction penalty
Stereotypically, high-level languages make complex programming simpler, while low-level languages tend to produce more efficient code. Abstraction penalty is the barrier preventing applying high level programming techniques in situations where computational resources are limited. High level programming features like more generic data structures, run-time interpretation and intermediate code files often result in slower execution speed, higher memory consumption and larger binary size [1][2][3]. For this reason, code which needs to run particularly quickly and efficiently may be written in a lower-level language, even if a higher-level language would make the coding easier.
However, with the growing complexity of modern microprocessor architectures, well-designed compilers for high-level languages frequently produce more efficient code than most low-level programmers can produce by hand.[citation needed]
Relative meaning
The terms "high-level" and "low-level" are inherently relative. Originally, assembly language was considered low-level and COBOL, C, etc. were considered high-level, as they allowed the abstractions of functions, variables and expression evaluation. Many programmers today might refer to C as low-level, as it still allows memory to be accessed by address, and provides direct access to the assembly level. For more on this distinction, see C2's page about high-level languages.
Execution models
There are three models of execution for modern high-level languages:
Interpreted
Interpreted languages are read and then executed directly, with no compilation stage.
Compiled
Compiled languages are transformed into an executable form before running. There are two types of compilation:
Intermediate representations
When a language is compiled to an intermediate representation, that representation can be optimized or saved for later execution without the need to re-read the source file. When the intermediate representation is saved it is often represented as bytecode.
Machine code generation
Some languages compile directly into machine code. Virtual machines that execute bytecode directly or transform it further into machine code have blurred the once clear distinction between intermediate representations and truly compiled languages.
Translated
A language may be translated into a low-level programming language for which native code compilers are already widely available. The C programming language is a common target for such translators.
Low-level programming language
In computer science, a low-level programming language is a language that provides little or no abstraction from a computer's microprocessor. The word "low" does not imply that the language is inferior to high-level programming languages but rather refers to the small or nonexistent amount of abstraction between the language and machine language; because of this, low-level languages are sometimes described as being "close to the hardware."
According to the Utah State Office of Education, a low level language is one that does not need a compiler or interpreter to run. The processor in which the language was written for would be able to run the code without the use of either of these.
On the other hand, a high level language is a programming language which abstracts the execution semantics of a computer architecture from the specification of the program. This abstraction make the process of developing a program a much more simple and understandable process. The amount of abstraction that is provided often defines how 'high level' a programming language is.
Low-level programming languages are sometimes divided into two categories: first generation, and second generation.
First generation
The first-generation programming language, or 1GL, is machine code. It is the only language a microprocessor can understand directly. Currently, programmers almost never write programs directly in machine code, because not only does it (like assembly language) require attention to numerous details which a high-level language would handle automatically, but it also requires memorizing or looking up numerical codes for every instruction that is used. For this reason, second generation programming languages abstract the machine code one level. • Low-level languages are easy for the computer to understand but are more difficult for the programmer to write. Example: A function in 32-bit x86 machine code to calculate the nth Fibonacci number:

8B542408 83FA0077 06B80000 0000C383
FA027706 B8010000 00C353BB 01000000
B9010000 008D0419 83FA0376 078BD98B
C84AEBF1 5BC3
(This was created by an assembler, from the assembly listing below.)
Second generation
The second-generation programming language, or 2GL, is assembly language. It is considered a second-generation language because while it is not a microprocessor's native language, an assembly language programmer must still understand the microprocessor's unique architecture (such as its registers and instructions). These simple instructions are then compiled directly into machine code. The assembly code can also be abstracted to another layer in a similar manner as machine code is abstracted into assembly code.
Example: The same Fibonacci number calculator as above, but in MASM assembly language:

fib:
mov edx, [esp+8]
cmp edx, 0
ja @f
mov eax, 0
ret

@@:
cmp edx, 2
ja @f
mov eax, 1
ret

@@:
push ebx
mov ebx, 1
mov ecx, 1

@@:
lea eax, [ebx+ecx]
cmp edx, 3
jbe @f
mov ebx, ecx
mov ecx, eax
dec edx
jmp @b

@@:
pop ebx
ret

References
1. ^ Surana P (2006). "Meta-Compilation of Language Abstractions." (PDF). Retrieved on 2008-03-17.
2. ^ Kuketayev. The Data Abstraction Penalty (DAP) Benchmark for Small Objects in Java.. Retrieved on 2008-03-17.
3. ^ Chatzigeorgiou & Stephanides (2002), "Evaluating Performance and Power Of Object-Oriented Vs. Procedural Programming Languages", in Blieberger & Strohmeier, Proceedings - 7th International Conference on Reliable Software Technologies - Ada-Europe'2002, Springer, pp. 367,
Retrieved from "http://en.wikipedia.org/wiki/High-level_programming_language"
Categories: Computer languages
Hidden categories: All articles with unsourced statements | Articles with unsourced statements since March 2008

Powered by Drupal - Design by artinet