Combining the assurances of type safe, pure functional programming (FP) with the efficiency and convenience of imperative programming will allow us to realise the full potential of both. Plasma code is familiar to most programmers with imperative features like loops and arrays. It backs this up with strong types, no side-effects and the code-reuse of functional programming. Strong types and lack of side-effects also enable painless concurrent and parallel programming, including automatic parallelisation.

Just as gases expand to fill their container, Plasma programs (named for the 4th state of matter) will flow to utilise modern parallel hardware.

We have always needed reliable software that is easy to read and modify; while the need to easily scale computing has emerged more recently as Moore’s law and cache coherence restrict available performance. Plasma’s features are carefully chosen based on these needs.

Many of these features are unimplemented, our roadmap shows the status of various features.


Side-effect free and single-assignment
Without side-effects or rebinding a variable's value cannot change unexpectedly, helping programmers more confidently understand their programs and debugging easier. Side-effect free semantics also make it easier to apply many optimisations including automatic parallelisation.
Declared effects, such as IO
Plasma uses a resource system to make effects (such as IO) safe. Resources are composable unlike monads.
Familiar procedural syntax
We will support loops, arrays and other imperative programming features. This benefits both experienced developers and novices. Loops work on different aggregate types and implement map, reduce, filter and combinations of these.
A strong, static type system
supporting ADTs, parametric polymorphism, interfaces and type inference.
Keeping things simple is an excellent engineering practice. It also makes the language and tools easier to understand and benefits experienced programmers as well as novices. When compared with functional programming:
  • Plasma will have a reduced emphasis and dependence on abstract concepts like monads.
  • Many interfaces will have more sensible names, eg: Mappable rather than Functor.
  • We will also aim for good tooling and a consistent syntax; things that are different will look different.
Bytecode and native code
Generic token-based bytecode interpreter, in the future more optimal bytecode interpreters for each major platform. and hopefully native code generation.
Foreign Function Interface (FFI)
Interoperability with C.
Multiple concurrency abstractions
Tasks, channels, mvars, semaphores, streams, futures and software transactional memory provide safer abstractions than traditional threads and locks concurrency.
Deterministic parallelism
Parallelise programs based on data-flow, loops and possibly pipelines by adding annotations Parallelism without concurrency is deterministic and side-effect free. It won't constrain the structure of the program or have the "what colour is your function?" problem.
Automatic parallelisation
The compiler can automatically annotate the program to parallelise it. See my Ph.D. research.
Free/Libre software
MIT License

Many of these features are unimplemented, our roadmap shows the status of various features.


The following things have been published about Plasma.