ArticleslgStudy

science

Comparison of programming languages

Comparison of programming languages is a science 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 Comparison of programming languages rather than just read about it. In short: Programming languages are used for controlling the behavior of a machine (often a computer). Like natural languages, programming languages follow rules for syntax and semantics.

Comparison of programming languages — main illustration
Comparison of programming languages — illustration

Key takeaways

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

Reference excerpt

Programming languages are used for controlling the behavior of a machine (often a computer). Like natural languages, programming languages follow rules for syntax and semantics. There are thousands of programming languages with new ones developed annually. While few languages achieve widespread adoption, professional programmers may use multiple languages throughout their career.

Most programming languages are not standardized by an international (or national) standard, even widely used ones, such as Perl or Standard ML (despite the name). Notable standardized programming languages include ALGOL, C, C++, JavaScript (under the name ECMAScript), Smalltalk, Prolog, Common Lisp, Scheme (IEEE standard), ISLISP, Ada, Fortran, COBOL, SQL, and XQuery.

General comparison The following table compares general and technical information for a selection of commonly used programming languages. See the individual languages' articles for further information.

Type systems

Failsafe I/O and system calls Most programming languages will print an error message or throw an exception if an input/output operation or other system call (e.g., chmod, kill) fails, unless the programmer has explicitly arranged for different handling of these events. Thus, these languages fail safely in this regard. Some (mostly older) languages require that programmers explicitly add checks for these kinds of errors. Psychologically, different cognitive biases (e.g., optimism bias) may affect novices and experts alike and lead them to skip these checks. This can lead to erroneous behavior. Failsafe I/O is a feature of 1C:Enterprise, Ada (exceptions), ALGOL (exceptions or return value depending on function), Ballerina, C#, C++ (std::print() throws on failed operations), Common Lisp ("conditions and restarts" system), Curry, D (throwing on failure), Erlang, Fortran, Go (unless result explicitly ignored), Gosu, Harbour, Haskell, ISLISP, Java, Julia, Kotlin, LabVIEW, Mathematica, Objective-C (exceptions), OCaml (exceptions), OpenLisp, PHP, Python, Raku, Rebol, Rexx (with optional signal on... trap handling), Ruby, Rust (unless result explicitly ignored), Scala, Smalltalk, Standard ML , Swift ≥ 2.0 (exceptions), Tcl, Visual Basic, Visual Basic (.NET), Visual Prolog, Wolfram Language, Xojo, XPath/XQuery (exceptions), and Zeek. No Failsafe I/O: AutoHotkey (global ErrorLevel must be explicitly checked), C, COBOL, Eiffel (it actually depends on the library and it is not defined by the language), GLBasic (will generally cause program to crash), RPG, Lua (some functions do not warn or throw exceptions), and Perl. Some I/O checking is built in C++'s older I/O libraries (iostreams throw on failure, but C APIs like stdio or POSIX do not). Object Pascal, in Bash it is optional.

Expressiveness

The literature on programming languages contains an abundance of informal claims about their relative expressive power, but there is no framework for formalizing such statements nor for deriving interesting consequences. This table provides two measures of expressiveness from two different sources. An additional measure of expressiveness, in GZip bytes, can be found on the Computer Language Benchmarks Game.

Benchmarks

Benchmarks are designed to mimic a particular type of workload on a component or system. The computer programs used for compiling some of the benchmark data in this section may not have been fully optimized, and the relevance of the data is disputed. The most accurate benchmarks are those that are customized to your particular situation. Other people's benchmark data may have some value to others, but proper interpretation brings many challenges. The Computer Language Benchmarks Game site warns against over-generalizing from benchmark data, but contains a large number of micro-benchmarks of reader-contributed code snippets, with an interface that generates various charts and tables comparing specific programming languages and types of tests.

Timeline of specific language comparisons 1974 – Comparative Notes on Algol 68 and PL/I – S. H. Valentine – November 1974 1976 – Evaluation of ALGOL 68, JOVIAL J3B, Pascal, Simula 67, and TACPOL Versus TINMAN – Requirements for a Common High Order Programming Language. 1977 – A comparison of PASCAL and ALGOL 68 – Andrew S. Tanenbaum – June 1977. 1993 – Five Little Languages and How They Grew – BLISS, Pascal, ALGOL 68, BCPL & C – Dennis M. Ritchie – April 1993. 2009 – On Go – oh, go on – How well will Google's Go stand up against Brand X programming language? – David Given – November 2009

See also

Comparison of programming languages (basic instructions) Comparison of programming languages (syntax) Comparison of integrated development environments Comparison of multi-paradigm programming languages TIOBE index

References

Further reading Cezzar, Ruknet (1995). A Guide to Programming Languages: Overview and Comparison. Artech House. ISBN 978-0-89006-812-0.

Worked examples

Example 1 — a first encounter with Comparison of programming languages

Start with the simplest possible case. Write down what Comparison of programming languages claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, 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 Comparison of programming languages 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 Comparison of programming languages 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 Comparison of programming languages

In research
Comparison of programming languages appears in science 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 Comparison of programming languages 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
Comparison of programming languages is common in secondary-school and first-year university syllabi. It links to neighbouring topics Programming language comparisons, so understanding it makes those chapters shorter.
In everyday life
Look for Comparison of programming languages 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 “Comparison of programming languages” →

How to study Comparison of programming languages in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Comparison of programming languages 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 Comparison of programming languages out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Comparison of programming languages in simple terms?

Programming languages are used for controlling the behavior of a machine (often a computer). Like natural languages, programming languages follow rules for syntax and semantics.

Why does Comparison of programming languages matter?

Because it connects several science 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 Comparison of programming languages?

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 Comparison of programming languages.

Tags

  • Programming language comparisons

Keep exploring