Language
Aqua is a language for distributed workflow coordination in p2p networks.
It's structured with significant indentation.
1
-- Comments begin with double-dash and end with the line (inline)
2
func foo(): -- Comments are allowed almost everywhere
3
-- Body of the block expression is indented
4
bar(5)
Copied!
Values in Aqua have types, which are designated by a colon, :, as seen in the function signature below. The type of a return, which is yielded when a function is executed, is denoted by an arrow pointing to the right -> , whereas yielding is denoted by an arrow pointing to the left <-.
1
-- Define a function that yields a string
2
func bar(arg: i16) -> string:
3
-- Call a function
4
smth(arg)
5
​
6
-- Yield a value from a function
7
x <- smth(arg)
8
​
9
-- Return a yielded results from a function
10
<- "return literal"
Copied!
Subsequent sections explain the main parts of Aqua.
Data:
Execution:
  • ​Topology – how to express where the code should be executed
  • ​Execution flow – control structures
Computations:
Advanced parallelism:
Code management:
Reference:
Last modified 3mo ago
Copy link