📄️ Basic Concepts
Acorn is a line-oriented language. Usually, you write one thing on one line, then continue on to the next line.
📄️ Quantifiers
Acorn implements first-order logic through the forall and exists quantifiers. In a general sense, they create expressions out of other expressions, while adding bound variables:
📄️ Variables
The let statement lets you give a name to an expression.
📄️ If-else
You can use the if and else keywords to make a conditional expression. Its general form is:
📄️ Functions
The define statement lets you define a named function.
📄️ Imports
Imports in Acorn work similarly to imports in Python.
📄️ Structure Types
Structure types group together objects of other types. They are defined with the structure keyword. For example, we can make a type out of two integer fields:
📄️ Inductive Types
An inductive type can refer to itself in its definition. It describes ways to build objects of this type from other objects of the type.
📄️ Classes
Once you've defined an inductive type or a structure type, you can augment it with additional class methods.
📄️ Experimental Stuff
Overall, the Acorn language is in beta. Features are likely to change as we get feedback from people using the software.