3 ms·
`tidy` is similar to python context managers, or an automatic `defer`. So any resources within the function have their `.close`s run. `heap` is a semantics of
by mjburgess 3y ago
`tidy` is similar to python context managers, or an automatic `defer`. So any resources within the function have their `.close`s run.
`heap` is a semantics of `new`: allocate to the global heap
`temp` likewise means allocate to a smaller temporary arena
`pure` means no allocations and no resources
$vars are compile-time where $lowercase are integers, $UPPERCASE are types.
The type int*10 is a static array, so $T*$i is a compile-time variable but run-time static array.
The `api` keyword is for interface types, it's a syntax transform to a compile-time variable, ie., `fn($T) generic(x: $T)` with a compile-time constraint on $T