Element is a minimal functional programming language. Element code runs using a host which can interpret or compile it to other formats. One of these formats is the bytecode format, LMNTIL (Element Intermediate Language), for use in native and embedded applications.
- Single number data type
Num
- Structured types using
struct
- First class functions and local functions
- Intrinsics (math intrinsics, collection intrinsics, control flow)
- Genericity via
Any
type
Example:
sum(list) = list.fold(0, Num.add);
factorial(n) = List.range(0, n).fold(1, Num.mul);
For full details see the Element Reference Manual.
Element includes a core set of functionality in the base library Prelude.
Element also comes with a Standard Library.
- Laboratory - The Element Host Test Suite - .NET Core 3.0 CLI
- Test runner using NUnit containing host compliance tests, prelude tests and standard library tests.
- Can test Element.NET directly or invoke other compilers via CLI convention
- Element.NET - .NET Standard 2.0
- Element parser using Lexico
- Element function evaluation via:
- Direct evaluation (slow)
- Compilation to CLR Function using LINQ Expressions (very fast)
- AoT compilation targets including:
- LMNTIL
- C
- libelement - C++
- Element parser
- Element function evaluation
- AoT compilation to:
- LMNTIL - planned
- LMNT - C
- Alchemist - .NET Core 3.0 CLI for Element.NET
- CLI for executing Element via a REPL or compiling to other targets
- libelement.CLI - C++ CLI for libelement
- CLI for executing Element via a REPL or compiling to other targets
- Element.Unity - Unity using Element.NET
- Node Graph - allows visualization and modification of Element code using an interactive Node Graph
- Debugger - allows evaluating arbitrary Element code and exploring all of the intermediates in a foldout tree
- Interactive Workspace - allows evaluating arbitrary Element code and displaying immediate intermediates and visualization (Likely to be merged with Debugger in future)
- VSCode Linter - VSCode Extension
- Syntax highlighting for .ele files
- Installation guide:
- Download or clone this repo
- Extract
element-vscode
to%UserProfile%/.vscode/extensions
- Restart VS Code and enjoy!