2021-06-25 10:20:16 +00:00
# Basics
2021-06-28 11:27:19 +00:00
Aqua is an opinionated domain-specific language. It's structured with significant indentation.
2021-06-25 10:20:16 +00:00
```text
2021-06-26 00:54:16 +00:00
-- Comments begin with double-dash and end with the line (inline)
2021-06-25 10:20:16 +00:00
func foo(): -- Comments are allowed almost everywhere
-- Body of the block expression is indented
bar(5)
```
2021-06-29 01:24:13 +00:00
Values in Aqua have types, which are designated by a colon, `:` , as seen in 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 `<-` .
2021-06-25 10:20:16 +00:00
```text
-- Define a function that yields a string
func bar(arg: i16) -> string:
-- Call a function
smth(arg)
2021-06-29 01:24:13 +00:00
2021-06-25 10:20:16 +00:00
-- Yield a value from a function
x < - smth ( arg )
2021-06-29 01:24:13 +00:00
2021-06-25 10:20:16 +00:00
-- Return a yielded results from a function
< - " return literal "
```
Subsequent sections explain the main parts of Aqua.
Data:
* [Types ](types.md )
* [Values of that types ](variables.md )
Execution:
* [Topology ](topology.md ) – how to express where the code should be executed
2021-06-28 11:27:19 +00:00
* [Execution flow ](flow/ ) – control structures
2021-06-25 10:20:16 +00:00
Computations:
* [Abilities & Services ](abilities-and-services.md )
Advanced parallelism:
* [CRDT Streams ](crdt-streams.md )
Code management:
* [Imports & exports ](statements-1.md )
Reference:
* [Expressions ](expressions/ )