Version 20 (modified by benl, 8 years ago) (diff) |
---|
Languages
DDC compiles two related languages.
- The Disciple Source Language is what the user normally sees. It has type inference, type classes, field projections, and lots of pattern matching sugar to make the programs fun to write. The semantics of the source language is defined by giving a translation to the core language.
- The Disciple Core Language is what all of the optimisations are performed on. It is explicitly typed, and has a clean, well defined semantics. The user can write core programs explicitly, but there's more typing involved.
Both these languages are called "Disciple" because they are so strongly related. In future we may merge the two, so that one can write explicit type abstractions in the source program.
For discussion of the motivations of Disciple and DDC, please see the first chapter of: Type Inference and Optimisation for an Impure World
Gentle introduction for Haskell programmers
The main differences are:
- Strict EvaluationOrder is the default, but laziness can be introduced explicitly.
- All data objects support DestructiveUpdate.
- Type directed FieldProjections complement type classing.
- The EffectSystem tracks what computational effects are being used in a program, without the need for state monads.
- The ClassSystem ensures that effects and destructive update play nicely with laziness.
- ClosureTyping is used to track data sharing, and to preserve soundness in the presence of PolymorphicUpdate.