Marisa
Queer tech nerd and enthusiast~ Will post random thoughts and code stuff. Witch girls forever....
16+. NSFW will be CWd and all my images have alt text
Remember to always further the woke antifa agenda by turning free software gay.
BLM, ACAB, Trans rights
I've been thinking fully low-level languages really need to exist (C, Zig, Rust, etc) for mission-critical stuff, but I also think most other software doesn't need that level of control to still be of really high quality. Go has a GC and a runtime and I've seen some really excellent programs written in it for example... ![]()
I've been thinking about a sort of "mid-level language" approach, one where everything is on the stack by default and you have access to raw pointers (which can't be null and may be like indices under the hood or something). If you want heap memory, you have to manually allocate it with either:
- A garbage collector, which you are in charge of when it runs and when it has to free everything
- A memory arena, which you are in charge of when you free it
- Maybe some other allocation method? Object pools/buckets, etc?
It would ideally be memory safe though I'm not sure how to achieve that and also allow memory arenas without some super complicated borrow checker.
C interop would also be as easy as humanly possible so you can easily "drop a level" when you need to for performance, too.
The advantage of this idea is you'd have the ease of use and memory safety of higher level languages but you can still fine tune and opt into "easy" optimizations that are usually low-level language only.
What do you think?
I've been thinking fully low-level languages really need to exist (C, Zig, Rust, etc) for mission-critical stuff, but I also think most other software doesn't *need* that level of control to still be of really high quality. Go has a GC and a runtime and I've seen some really excellent programs writt
@lisyarus@mastodon.gamedev.place Most programming languages have expression statements: statements that are just a blank expression. Like,
3 + 3;
is valid syntax in a lot of languages. These are what make multi-line no-semicolon syntax ambiguous, because
let x = 10
- 1
could be
let x = 10 - 1;
or
let x = 10;
- 1;
but if "- 1;" is not a valid statement (because expression statements are forbidden) then the only valid interpretation is 10 - 1.

