Dove uses the most elegant, mordern syntax you can ever find on the planet Earth.
Line comments start with //
and ends where Dove finds a new line.
// This is a comment.
Block comments start with /*
and ends with */
.
/*
This is a block comment.
It can continue for many lines.
*/
Using ;
to end lines is deprecated and is not supported in Dove.
\n
is meaningful in Dove - it end lines.
// Below are two statements:
let a = 3 // End of this line.
let b = 4
Dove identifiers is case-sensitive and should start with a letter or underscore, and may follow by letters, digits, and underscores.
Variables should be lower case snake case.
dove_variable
Constants should be upper case snake case.
DOVE_CONSTANT
Private variables/constants should have a leading underscore.
_private_var
_private_const
The braces {}
are used for blocks of code. Blocks are used in function/method definitions, control flows, or anywhere in your Dove code.
{
statement1
statement2
statement3
}