Concurrent programming language
Concurrent programming languages are programming languages that use language constructs for concurrency. These constructs may involve multi-threading, support for distributed systems, message passing, shared resources or futures (known also as promises).
With some languages communication between concurrent parts of an application is hidden from the programmer (e.g. by using futures), with others it must be handled explicitly. Explicit communication can be divided into two classes:
- Shared-memory communication, in the which concurrent parts communicate by changing shared memory locations. This style of concurrent programming usually requires the application of some form of locking (e.g. mutexes, semaphores, or monitors) to coordinate between threads.
- Message-passing communication, in which messages are sent to recipients as in the Actor model and Process calculi. Message-passing concurrency tends to be far easier to reason about than shared-memory concurrency, and is typically considered a more robust form of concurrent programming. Messages can be asynchronous (aka "send, pray, and if no acknowledgment send again"), as packets on the Internet, or may use a rendezvous style in which the sender blocks until the message is received, as in TCP on the Internet and synchronous process calculi.
Languages where concurrency was primary design motive
- Afnix - concurrent access to data is protected automatically (under name Aleph the language was originally used for the Plan 9 from Bell Labs operating system)
- ChucK - domain specific programming language for audio
- Cilk - a language based on C
- Comega - a research language extending C#, uses asynchronous communication
- Concurrent Pascal (by Brinch-Hansen)
- E - uses promises, ensures deadlocks cannot occur
- Erlang - uses asynchronous message passing with nothing shared
- Joule - a dataflow language, communicates by messages passing
- Limbo - the successor to Alef (Afnix), used in the Inferno (operating system).
- Mozart/Oz - a "multi-paradigm" language that supports both shared-state and message-passing concurrency as well as futures
- MultiLisp - Scheme variant extended to support paralelism
- Occam - influenced heavily by Communicating Sequential Processes.
- Pict - essentially an executable implementation of Milner's Pi-Calculus
- SR - a research language
Note that many of these languages are intended more as research languages (e.g. Pict) than as languages for production use. However, several of the examples (such as Erlang, Limbo, and Occam) have seen industrial use at various times in the last 20 years.
Languages with support for concurrency
Majority of other languages provides support for concurency in form of libraries (on level roughly comparable with the above list).