StingType 1.0: the freeze, and what's left
GSTC is at 0.95 (prerelease). From here to 1.0 the language is frozen: no syntax or meaning changes, only fixes. A program that builds with 0.95 and doesn't rely on a bug will build and behave the same with 1.0 and every 1.x.
Frozen (SPEC.md is the contract)
- Syntax: the reserved words (SPEC 1.1), word-closed blocks
(
end,endfn,endstruct...), no braces,//comments. - Types: the integer, float, bool, str, pointer, array, slice, function, struct, union, enum and generic forms of SPEC 2, with no implicit conversions.
- Checked arithmetic:
+ - *, division, shifts, indexing and casts stop the program with a runtime error when they go wrong;wrap_add/wrap_sub/wrap_mulandchecked_*are the ways around. - Memory: no garbage collector;
newresults andallocare yours to free; freeing twice is a runtime error. - Libraries:
include "x.sth"/as name; one file has one copy however many names include it. - Generics: inference from arguments, then from where the result
goes; explicit
f<T>(...). - Function values: real machine addresses; any parameter type, a number/bool/pointer/function result.
- Errors: the wording and shape of compile errors and runtime
errors (tools may rely on
file:line:colandruntime error:).
Not frozen (may grow in 1.x, without breaking programs)
- New library functions and new libraries.
- New targets, and the code gstc generates (faster, same behavior).
- New warnings (a warning never stops a build).
- New compiler options.
Before 1.0
| Item | Status |
|---|---|
| Language freeze | done (this document) |
| SPEC.md matches the compiler | done; checked by the language tests |
| TUTORIAL.md: a guided path, every program tested | done |
gstc --version |
done: gstc 0.95 (prerelease) |
| Every test suite passing on Linux 64/32 and ARM64 | done |
| Windows: the test kit run on a real Windows 10/11 PC | waiting -- run GSTC-Windows-Test-Kit, send back results.txt |
| Android: BlockWorld played on a phone with this compiler | waiting |
| Fixes for anything those two find | then 1.0 |