b7a8909818
- Improved performance by batching simulatenous node edits, including metadata updates when dragging many selected nodes together. - Updated Vue to new version, allowing us to use `defineModel`. - Fixed #9161 - Unified all handling of auto-blur by making `useAutoBlur` cheap to register - all logic goes through a single window event handler. - Combined all `ResizeObserver`s into one. - Fixed the behaviour of repeated toast messages. Now only the latest compilation status is visible at any given time, and the errors disappear once compilation passes. - Actually fixed broken interaction of node and visualization widths. There no longer is a style feedback loop and the visible node backdrop width no longer jumps or randomly fails to update. |
||
---|---|---|
.. | ||
assignment.md | ||
comments.md | ||
encoding.md | ||
function-arguments.md | ||
functions.md | ||
imports.md | ||
layout.md | ||
literals.md | ||
macros.md | ||
naming.md | ||
projections.md | ||
README.md | ||
top-level.md | ||
types.md |
layout | title | category | tags | order | ||
---|---|---|---|---|---|---|
section-summary | Enso's Syntax | syntax |
|
0 |
Enso's Syntax
When working with a programming language, the syntax is the first thing that a user encounters. This makes it utterly integral to how users experience the language, and, in the case of Enso, the tool as a whole.
Enso is a truly novel programming language in that it doesn't have one syntax, but instead has two. These syntaxes are dual: visual and textual. Both are first-class, and are truly equivalent ways to represent and manipulate the program. To that end, the design of the language's syntax requires careful consideration, and this document attempts to explain both the what, of Enso's syntax, but also the why.
Furthermore, Enso is novel in the fact that it does not enforce any artificial restriction between the syntaxes of its type and value levels: they are one and the same. This enables a staggering level of uniformity when programming in the language, allowing arbitrary computations on types, because in a dependently-typed world, they are just values.
The various components of Enso's syntax are described below:
- Encoding: The source encoding of Enso files.
- Naming: The naming of Enso language constructs.
- Layout Rules: The layout rules for Enso code.
- Imports and Exports: The syntax and rules for importing modules and exporting module functions.
- Literals: The syntax for Enso literals.
- Assignment: The syntax for various forms of assignment expression in Enso.
- Types and Type Signatures: The syntax for writing types and type signatures in Enso.
- Macros: The syntax for writing macros in Enso.
- Top-Level Syntax: The syntax at the top-level of an Enso file.
- Functions: The syntax for writing functions in Enso.
- Function Arguments: The syntax for function arguments in Enso.
- Field Access: The syntax for working with fields of data types in Enso.
- Comments: The syntax for writing comments in Enso.