$$ Syntax (Echo Expressions)
Stephen Leach edited this page Jan 22, 2022
·
1 revision
Nutmeg does not support the compound operators such as +=
, %=
etc. Instead it provides a shorthand for repeating the target of an assignment. Quite simply $$
echoes the left-hand side of an assignment. So instead of:
x += 1
in Nutmeg we write
x <- $$ + 1 ### Syntactic sugar for x <- x + 1
Although it is slightly more verbose than the compound operators, it is still quite brief and has the advantage of working with any function. For example it is perfectly valid to write:
x <- f( $$ ) + 1
Design Principles
- Nutmeg Design Goals
- The Spirit of Nutmeg
- Syntax Design
- State Encapsulation
- List of Design Decisions
- Influences
Language Features
- $$-Syntax (Echo Expressions)
- Actors
- Allocators
- Annotations
- Assignments
- Bindings
- Blocks and Modifiers
- Brackets
- Capsules (Proposed)
- Clean Procedures
- Comments
- Copy by Snapshot
- Declarations
- Finesses
- For Syntax
- Futures
- Identifiers
- If Syntax
- Messages
- Pass Syntax
- Queries
- References
- Return Statements
- Sealing
- Semicolons
- Strings
- Switch Syntax
Built-in Libraries and Functions
Implementation
- Architecture in one page
- Autoconversion
- Bundle Files
- Code-Trees
- Compiler Pipeline
- Components of the Compiler
- Installation File Structure
- Mishaps
- Peekable Pushable Generators
- Recursive Descent Parser
- Resolver
- Walkthrough of Hello-World
How-Tos
Process