Just a few off the top of my head:
* No need to specify type. Use var.
* Simpler for loops
* Inbuilt types for Hash Tables
* File types, making file reading much easier
* Function types, making it easier to pass functions around
* Doctype access
* Threads & Mutexes
* Format strings
* GC (with ability to turn C-types into Cello-types for GCing.)
It is fundamentally syntax-sugar, but enough that what you end up with doesn't necessarily look like C at the end.
with(f in new(File, $S("test.txt"), $S("r"))) {
var k = new(String); resize(k, 100);
var v = new(Int, $I(0));
foreach (i in range($I(2))) {
scan_from(f, 0, "%$ is %$ ", k, v);
show(k); show(v);
}
}
(From: http://libcello.org/learn/file)I see types everywhere; they appear to just have been moved from the left-hand side to the right-hand side? eg:
var i0 = $(Int, 5);
var items = new(Array, Int, i0, i1, i2); var i0 = $(Int, 5);
i0 = $(String, "Hello");
Perfectly valid.It's higher level because it provides abstractions that improve the language's expressiveness.
You've really gone down the rabbit hole if you think GC is an improvment