What is Plutus Foundation?¶
In order for an application to run its trusted kernel of logic as a script on a ledger, the ledger needs a way of specifying and executing scripts. Scripts are simply programs, so this means we need a programming language.
In the Plutus Platform, this language is Plutus Core. Plutus Core is a variant of the lambda calculus, a well-studied formalism for computing.
Plutus Core is our “assembly language”. Trust me, you don’t want to see any! Dealing with that is the compiler’s job.
Plutus Core is designed for simplicity, determinism, and to allow careful cost control of program execution. Using the lambda calculus makes it an easy compilation target for functional programming languages, and allows us to have a simple, formally verified evaluator.
Writing Plutus Core by hand is not a job for a human! It is designed to be written by a compiler, and the Platform provides a compiler from a subset of Haskell to Plutus Core. This allows you to seamlessly write applications in Haskell, while compiling part of the code to on-chain Plutus Core, and part into an off-chain application.
Supporting “mixed” code in this way enables libraries written with the Plutus Haskell SDK to share logic and datatypes across both parts of the application, reducing the risk of errors significantly.