ArticleslgStudy

mathematics

Programming language

Programming language is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Programming language rather than just read about it. In short: A programming language is a formal language designed to express computations, typically supporting the specification of software both for humans and for computers. Execution of a program requires an implementation.

Programming language — main illustration
Programming language — illustration

Key takeaways

  • Programming language belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Programming language to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Programming language from memory before moving on to harder problems.

Reference excerpt

A programming language is a formal language designed to express computations, typically supporting the specification of software both for humans and for computers. Execution of a program requires an implementation. There are two main approaches for implementing a programming language – compilation, where programs are translated ahead-of-time to machine code, and interpretation, where programs are directly executed. In addition to these two extremes, some implementations use hybrid approaches such as just-in-time compilation and bytecode interpreters. The design of programming languages has been strongly influenced by computer architecture, with most imperative languages designed around the ubiquitous von Neumann architecture. While early programming languages were closely tied to the hardware, modern languages often hide hardware details via abstraction in an effort to enable better software with less effort. These languages are known as high-level languages.

Relation to natural languages Programming languages have some similarity to natural languages in that they can allow communication of ideas between people. Programs are generally human-readable and can express complex ideas however, the kinds of ideas that programming languages can express are ultimately limited to the domain of computation. The term computer language is sometimes used interchangeably with programming language but some contend they are different concepts. Some contend that programming languages are a subset of computer languages. Some use computer language to classify a language used in computing that is not considered a programming language. Some regard a programming language as a theoretical construct for programming an abstract machine, and a computer language as the subset thereof that runs on a physical computer, which has finite hardware resources. John C. Reynolds emphasizes that a formal specification language is a programming language as much as any language intended for execution. He argues that textual and even graphical input formats that affect the behavior of a computer are programming languages, despite the fact they are commonly not Turing-complete, and remarks that ignorance of programming language concepts is the reason for many flaws in input formats.

History

Early developments The first programmable computers were invented during the 1940s, and with them, the first programming languages. The earliest computers were programmed in first-generation programming languages (1GLs), machine language (simple instructions that could be directly executed by the processor). This code was very difficult to debug and was not portable between different computer systems. In order to improve the ease of programming, assembly languages (or second-generation programming languages—2GLs) were invented, diverging from the machine language to make programs easier to understand for humans, although they did not increase portability. Initially, hardware resources were scarce and expensive, while human resources were cheaper. Therefore, cumbersome languages that were time-consuming to use, but were closer to the hardware for higher efficiency were favored. The introduction of high-level programming languages (third-generation programming languages—3GLs)—revolutionized programming. These languages abstracted away the details of the hardware, instead being designed to express algorithms that could be understood more easily by humans. For example, arithmetic expressions could now be written in symbolic notation and later translated into machine code that the hardware could execute. In 1957, Fortran (FORmula TRANslation) was invented. Often considered the first compiled high-level programming language, Fortran has remained in use into the twenty-first century.

1960s and 1970s

Around 1960, the first mainframes—general purpose computers—were developed, although they could only be operated by professionals and the cost was extreme. The data and instructions were input by punch cards, meaning that no input could be added while the program was running. The languages developed at this time therefore are designed for minimal interaction. After the invention of the microprocessor, computers in the 1970s became dramatically cheaper. New computers also allowed more user interaction, which was supported by newer programming languages. Lisp, implemented in 1958, was the first functional programming language. Unlike Fortran, it supported recursion and conditional expressions, and it also introduced dynamic memory management on a heap and automatic garbage collection. For the next decades, Lisp dominated artificial intelligence applications. In 1978, another functional language, ML, introduced inferred types and polymorphic parameters. After ALGOL (ALGOrithmic Language) was released in 1958 and 1960, it became the standard in computing literature for describing algorithms. Although its commercial success was limited, most popular imperative languages—including C, Pascal, Ada, C++, Java, and C#—are directly or indirectly descended from ALGOL 60. Among its innovations adopted by later programming languages included greater portability and the first use of context-free, BNF grammar. Simula, the first language to support object-oriented programming (including subtypes, dynamic dispatch, and inheritance), also descends from ALGOL and achieved commercial success. C, another ALGOL descendant, has sustained popularity into the twenty-first century. C allows access to lower-level machine operations than other contemporary languages. Its power and efficiency, generated in part with flexible pointer operations, comes at the cost of making it more difficult to write correct code. Prolog, designed in 1972, was the first logic programming language, communicating with a computer using formal logic notation. With logic programming, the programmer specifies a desired result and allows the interpreter to decide how to achieve it.

1980s to 2000s

… excerpt ends here. Continue reading the full article.

Illustrations

Programming language: The source code for a computer program in C. The gray lines are comments that explain the program to humans. When compiled and run, it will give the output "Hello, world!".
The source code for a computer program in C. The gray lines are comments that explain the program to humans. When compiled and run, it will give the output "Hello, world!".
Programming language: Two people using an IBM 704 mainframe—the first hardware to support floating-point arithmetic—in 1957. Fortran was designed for this machine.[17][16]
Two people using an IBM 704 mainframe—the first hardware to support floating-point arithmetic—in 1957. Fortran was designed for this machine.[17][16]
Programming language: A small selection of programming language textbooks on sale in Bangalore, India, 2011
A small selection of programming language textbooks on sale in Bangalore, India, 2011
Programming language: Parse tree of Python code with inset tokenization
Parse tree of Python code with inset tokenization
Programming language: Syntax highlighting is often used to aid programmers in recognizing elements of source code. The language above is Python.
Syntax highlighting is often used to aid programmers in recognizing elements of source code. The language above is Python.

Worked examples

Example 1 — a first encounter with Programming language

Start with the simplest possible case. Write down what Programming language claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Programming language before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Programming language ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Programming language

In research
Programming language appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Programming language in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Programming language is common in secondary-school and first-year university syllabi. It links to neighbouring topics Mathematical notation, Notation, Programming language classification, so understanding it makes those chapters shorter.
In everyday life
Look for Programming language outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Programming language” →

How to study Programming language in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Programming language means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Programming language out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Programming language in simple terms?

A programming language is a formal language designed to express computations, typically supporting the specification of software both for humans and for computers. Execution of a program requires an implementation.

Why does Programming language matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Programming language?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Programming language.

Tags

  • Mathematical notation
  • Notation
  • Programming language classification
  • Programming languages

Keep exploring