The Usual
Vine has the usual complement of standard programming language features, including:
- integers:
1 + 2 * 3 - floats:
1.0 + 2.0 * 3.0 - booleans (including short-circuiting):
true && !(false || 1 == 2) - lists:
[1, 2, 3] ++ [4, 5, 6] - strings:
"abc" ++ "def" - tuples:
(1, 1.0, "abc"),(1, 2).0 - variables:
let x = 5; x += 1 - basic control flow:
if condition { ... } else { ... }while condition { ... }loop { ... }(loops untilbreak)return valuebreak,continue- loop labels:
while.label ... { ... break.label ... }
(Try some of these snippets in the vine repl!)
Many of Vine's features are influenced by Rust, and it has a similar expression-oriented syntax, type system, and module system.