Programming language

8,319 bytes added, 04:54, 9 November 2018
/* Imperative programming */ Duplicate links.
A '''Programming Languageprogramming language''' is a small set of words and syntactic rules that allow people to write computer programs. When the an artificial [[Computer Programlanguage]] is executed by a used mainly for giving instructions to [[computer]], it will follow the instructions and perform the requested work. Many different programming languages have been defined. Some are general-purpose and some are specific to s; a particular problem domain. However, programming languages evolve over time and usually become more general-purpose. For instance, secondary use is for the precise specification of [[BASIC Programming Languagealgorithm]] and the [[Pascal Programming Language]] were originally intended as teaching languages, for students of programmings. But both are now popular as general-purpose languages. The features A group of most modern programming languages are similar, but the words and syntax differ. For instance, the PRINT statement is used to output data in BASIC, whereas WRITELN is used instructions for the same a particular purpose in Pascal. Even when the words and syntax are similar between two languages, often the meaning (semantics) is differentknown as a [[computer program]].
Unlike When compared with human languages(e.g. English, French, Spanish, etc.), computer programming languages are very much smaller (having grammars , much simpler, and are also more precise. Most programming languages consist of around two dozen a mixture of English words) and define meanings more preciselymathematical notation; very few programming languages have a base vocabulary exceeding 60 words, although they may also have utility libraries with hundreds of entries which provide optional extra functionality.
Many thousands of different programming languages have been defined, though only a few dozen are in widespread use. The first publicly available programming language was A-0, was developed in 1951by [[Grace Hopper]]. In 1948 Zuse published a paper (in "Archiv der Mathematik") about an early programming language Plankalk├╝l, though this was not actually implemented until 1998.
==Describing a programming language==
While human languages such as English may have rules of grammar, there are almost always exceptions to these rules. To reduce ambiguity, most programming languages have their [[grammar]] or syntax rigidly defined by a relatively small number of rules, with no exceptions. In many cases some variation of a [[Context-Free Grammar|context-free grammar]] is used, often Backus-Naur Form, or some extension thereof. Note that context-free grammars are not powerful enough to describe human languages such as English.
==Implementation The meaning or [[semantics]] of Programming Languages==A set of instructions written any particular construct in a programming language is called '''source code''', or simply '''code'''most commonly described in fairly precise English. In order for a computer Several unsuccessful attempts have been made to execute find 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''' useful and '''Assemblers''' convert formal way of describing 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 10semantics.
The more important programming languages have an internationally agreed official standard (ISO is the international standards organisation, ANSI is the standards body in the United States). In theory, programs which conform to the relevant standard should be usable on most types of computer; this works in practice most of the time, provided that the programmers have been careful to avoid machine dependencies. Such agreed standards are usually revised every 5 to 15 years, often with new features being added, and sometimes with old features being either removed or marked as obsolete.
==Distinguishing Features==Programming languages Very few programmers learn a programming language directly from the formal definition, which exists primarily as a reference which can be divided into '''declarative''' and '''procedural''' languagesconsulted in cases of doubt. Declarative languages define information such as relationships There are usually plenty of books and attributes. Modula is an example of a declarative language. Procedural languages define processes (algorithms) training courses for the computer to followmore common programming languages. C is an example of a procedural language.
Languages can also be divided into '''low-level languages''' such as Assembly, and '''high-level languages''' such as COBOL==The art of programming==The act of writing a computer program using a programming language is called [[Computer Programming|programming]]. Low-level languages While there are those where the many guidelines, there are no rules which are guaranteed to produce a correct and usable program code interacts directly (, so programming is very much an art or fairly directly)skill rather than a science. Furthermore, with the CPU, whereas high-level languages have a higher level programmer must pay meticulous attention to detail: a moderately large program of abstractionsay 150, leaving the compiler or interpreter to deal with issuing the appropriate commands to the CPU000 instructions must be completely free of punctuation errors, grammatical errors, and similar issuesspelling mistakes, and must also be largely free of logical errors (as a size comparison, a 400-page paperback book contains about 16,000 lines - 1/10th the size).
The level of a language is a sliding scale, Various studies have found that programmers with some languages considered more high-level than others. Low-level langauges tend to require more steps to accomplish the same tasks than high-level languages. [[Assembly Language]] is not '''a''' specific language, such as BASIC, but rather any comparable amount of experience may differ in skill levels by a group factor of languages that are each specific to a particular [[CPU]]10 or more.
Most, if not all, high==Classifying programming languages==The initial distinction is between '''low-level languages support the following features: sub-routines (functions ''' and procedures), variables, flow-control, data types, I/O, arithmetic operations, string operations, dynamic allocation (heaps), arrays, structures, constants, and literals. Unique features of some languages will find their way into other languages if the feature is generally useful, or will remain unique to the language otherwise. An example of a feature that has not received widespread acceptance is '''setshigh-level languages'''.
===Low-level languages===Low-level languages are generally referred to as '''Objectsassembly''' are a means of encapsulating data and algorithms that operate on that data, with polymorphismlanguages. Originally specified Most instructions in SmallTalk, objects became popular with the advent of C++such languages equate directly to a single machine instruction. Many Each machine architecture has its own assembly language, so programs written in such languages which originally did are generally very machine-specific and are not support objects have since acquired themportable. For instance [[Visual BASIC]] is a version of BASIC supporting objectsThe instructions in such languages are usually fairly cryptic, often using abbreviations such as ADD, JNE, LR, LI, etc. LikewiseIn the early days of computing (up to about 1ate 1950's) most programming was done in assembly language, [[Borland Delphi]] is a version partly due to the limited power and memory capacity of Pascal supporting objectsearly computers.
==Language List=High-level languages===Most of the program code in use today is written in C, C++, COBOL, and Java. Other popular generalHigh-purpose level languages include BASIC, Pascalgenerally use a mixture of English words and simple mathematical notation, and C#. There are literally thousands of programming languages, although often available with little or no change on many different types of them computers, depending on what [[compiler]]s are simply variants of othersavailable on which computers. Variants These are called '''dialects'''often referred to as 3rd-generation languages (the 1st generation was raw binary machine code, the 2nd was assembly language). ThusA single high-level statement may be equivalent to using 3 to 10 assembly language statements, Visual BASIC so programming in a high-level language can be much more productive. One of the key reasons for the success of high-level languages is that they provide a dialect level of abstraction (sometimes several such levels). which means that a programmer can concentrate more on the problem to be solved and less on the detail of BASIChow to solve it.
The following is There are a sample list variety of different programming paradigms (styles of writing programs). Some programming languagesreally only support a single paradigm while others may support several. Possible paradigms include: imperative, declarative, procedural, functional, event-driven, object-oriented, list processing, and automata-based.
ALanguages associated with computers can also be classified as to whether or not they are Turing-0complete, i.e. whether or not they are capable of expressing all possible computations (assuming enough time and memory). Examples of languages which are not Turing-complete include SQL for describing databases and markup languages such as HTML and XML.
AdaExample statements include: X = 5 + Y*3 '''if''' result < 3 '''then''' stop '''print''' "Hello world"
ALGOL====Imperative programming====This is the most common type of programming language, and many of the other paradigms are derived from or build on this. When using an imperative language, the programmer is responsible for giving precise instructions as to exactly what has to be done and in what order. Note that some programs may have a random element included so that the results of a program are not necessarily predictable.
APLEarly high-level programming languages were often intended for use in a particular problem domain::[[COBOL]] for business purposes,:[[Fortran]] and Algol 60 for scientific calculations,:[[BASIC programming language|BASIC]] and [[Pascal programming language|Pascal]] for teaching purposes,:[[C]] for systems programming (writing operating systems and compilers),:[[LISP]] for list processing and artificial intelligence.
AssemblySuccessful programming languages evolve over time to become more general-purpose, or form the basis for other languages (e.g. '''C''' -> '''C++'''). The evolution often involves incorporating good features from other languages. The general trend is for languages to become more general-purpose and provide more levels of abstraction. The concepts of structured programming were put on a sound theoretical basis in the early 1970s and these have also influenced the evolution of some programming languages (e.g. Fortran 66 -> Fortran 77). The idea of objects (combining data with the applicable operations) was available in Simula in the mid 1960s, but did not become popular until the advent of [[C++]] in the early 1980s and [[Java]] in the mid 1990s; confusingly, Java and C++ have a lot of syntax in common, but the meaning (semantics) may differ drastically for what looks the same when written down.
[[BASIC]]====Declarative programming====Declarative languages define relationships and facts, ask a question, and leave it to the underlying program implementation and its theorem prover to work out how to derive an answer. An example of such a language is Prolog (Programming in Logic). These languages can be effective in areas such as database analysis, symbolic mathematics, and language parsing.
[[C]]==Implementation of programming languages==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.
[[C++]]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.
C#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 (computer science)|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.
COBOLPrograms which have been completely converted to machine code prior to use may easily run 10 times faster than programs which are interpreted.
DThere 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).
Euclid==Assorted Languages==
FORTRANInformation about some 2,500 programming languages can be found in 'The Language List'.<ref>{{cite web| url =| title = The Language List | accessdate = 2012-03-16}}</ref>
GalaxyAccording to LangPop <ref>{{cite web| url =| title = Programming Language Popularity | accessdate = 2012-03-13}}</ref> the most popular programming languages as of 2012 are:
IITRAN:[[C]]:[[C++]]:C#:[[Java]]:[[Javascript]]:[[Perl]]:[[PHP]]:[[Python (programming language)|Python]]:Ruby:Shell:[[SQL]]:Visual Basic
A similar list, which [[Java]] as the most popular programming language, was published for 2011.<ref></ref>
[[Javascript]]According to Professor Alfred V. Aho <ref>{{cite web| url =| title = Trends in Programming Language Design | accessdate = 2012-03-14}}</ref> The most influential high-level programming languages have been (in approximate order of development):
Jovial:[[FORTRAN]] showed that a useful high-level language was possible. :COBOL provided a language especially for business use.:LISPprovided a language suitable for symbol processing.:Algol 60 was the first block-structured language and set a new standard in language definition (Backus-Naur form).Modula 2::Algol 60 was described by Edsger Dijkstra, as "a great improvement on many of its successors".:[[BASIC]] was the first language used interactively with multiple simultaneous users.MUMPS Oberon:Simula 67 was the first object-oriented language.:[[PascalC]] PL/I Prolog RPG Sirius SmallTalk SNOBOL YACCshowed that operating systems and compilers could be written in a high-level language.
==Prescient Quotes on Police State Programming Surveillance==
* "The progress of [[science]] in furnishing the [[big government|government]] with means of [[espionage]] is not likely to stop with [[wiretap]]ping. Ways may some day be developed by which the [[Police state|government]], without removing papers from [[hard disk|secret drawers]], can reproduce them in [[Foreign Intelligence Surveillance Court|court]], and by which it will be enabled to expose to a [[jury]] the most intimate occurrences of the home. Advances in the [[computer science|psychic and related sciences]] may bring means of exploring unexpressed beliefs, thoughts and emotions. 'That places the [[liberty]] of every [[citizen|man]] in the hands of every [[tyrant|petty officer]]' was said by James Otis of much lesser [[tyranny|intrusions]] than these. 1 To Lord Camden a far slighter intrusion seemed '[[subversive]] of all the comforts of society.' Can it be that the [[Constitution]] affords no [[Right to Privacy|protection]] against such invasions of [[Fourth Amendment|individual security]]?"
** [[Louis Brandeis]]''' (1856-1941), [[United States Supreme Court]] [[Associate Justice]] Dissenting, ''[[Olmstead v. United States]]'', 277 U.S. 438 (1928).
[ The History of Computer Programming Languages][ The Language List]{{reflist|2}}
[[Category:Information technologyTechnology]][[Category:computer scienceComputer Science]]
Block, Siteadmin, SkipCaptcha, Upload, check user, delete, edit, move, oversight, protect, rollback, Administrator