aqua-book/language
2021-11-25 13:51:27 +00:00
..
control-scope-and-visibility GitBook: [alpha] 30 pages modified 2021-10-05 07:26:13 +00:00
expressions GitBook: [alpha] 29 pages modified 2021-10-05 07:37:12 +00:00
flow GitBook: [#79] Update Peer.timeout doc 2021-11-25 13:51:27 +00:00
header GitBook: [alpha] 28 pages modified 2021-09-14 11:27:56 +00:00
operators GitBook: [bb-edit] 31 pages modified 2021-06-26 00:54:16 +00:00
abilities-and-services.md GitBook: [alpha] 11 pages modified 2021-08-20 15:24:08 +00:00
basics.md GitBook: [alpha] 23 pages and one asset modified 2021-07-01 07:01:31 +00:00
closures.md GitBook: [#79] Update Peer.timeout doc 2021-11-25 13:51:27 +00:00
crdt-streams.md GitBook: [#79] Update Peer.timeout doc 2021-11-25 13:51:27 +00:00
header.md GitBook: [alpha] 30 pages modified 2021-10-05 07:26:13 +00:00
library-builtins.md GitBook: [master] 21 pages modified 2021-06-11 18:18:43 +00:00
README.md GitBook: [alpha] 29 pages modified 2021-10-05 07:37:12 +00:00
topology.md GitBook: [alpha] 27 pages modified 2021-09-08 11:29:52 +00:00
types.md GitBook: [alpha] 29 pages modified 2021-10-05 07:37:12 +00:00
variables.md GitBook: [alpha] 27 pages modified 2021-09-08 11:29:52 +00:00

Language

Aqua is a language for distributed workflow coordination in p2p networks.

It's structured with significant indentation.

-- Comments begin with double-dash and end with the line (inline)
func foo(): -- Comments are allowed almost everywhere
  -- Body of the block expression is indented
  bar(5)

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 <-.

-- Define a function that yields a string
func bar(arg: i16) -> string:
  -- Call a function
  smth(arg)

  -- Yield a value from a function
  x <- smth(arg)

  -- Return a yielded results from a function
  <- "return literal"

Subsequent sections explain the main parts of Aqua.

Data:

Execution:

Computations:

Advanced parallelism:

Code management:

Reference: