Releases: Neat-Lang/neat
Releases · Neat-Lang/neat
Neat 0.0.6
- All classes and interfaces are now non-nullable by default.
The compiler will attempt to stop you from declaring them without assigning a value.
null
does not convert to classes and interfaces anymore.
nullable
can be added to a class type to qualify it as "can be assignednull
". - Nullability can be stripped with the
if
test syntax:mut nullable C c; ... if (C c = c) { ... }
- Hashmaps are added to the language:
Value[Key]
. Note that this is very very basic,
for instance,Key
can only beint
,long
orstring
. - Tuples can be picked from:
(int | float) set; if (int i <- set) { ... }
- Tuple members can be annotated with
fail
:
(int | fail string) set; if (auto i <- set) { ... }
andi
will beint
.
Analogously,
auto i <- set;
This is equivalent to
if (int i <- set) ... else return the string from set;
- Structs, tuples, sizeof, assert, "foo $bar" can now be quoted
- Structs, classes can now contain
version(name) {} else {}
statements.
This interacts with a commandline switch-version=name
or-macro-version=name
.
Functions and modules cannot yet containversion()
. - Variables can be marked with
uninitialized
. They will still be initialized to zero,
but they will not demand an initializer value (for instance, for non-nullable classes).
Reading such a variable before writing it is an error.
Neat 0.0.5
Neat v0.0.5
Classes can now inherit from interfaces.
Class, struct and module members can be marked with public and private.
Structs can be declared anywhere.
Format strings can be used, as such: int a; string s = "a = $a";
neat build
builds the package specified in package.json
. Dependencies are fetched automatically.
Neat 0.0.4: Rename Cx to Neat
Avoid a naming collision with Delta, which renamed to Cx in April. (Angry developer noises)
Neat was the language name for the first compiler I ever wrote. However, almost nobody used it, so after bashing my head against the choice of name for a few hours I just decided to reuse it.