Dan Gohman, who works on WebAssembly, WASI and Rust systems libraries, writes about capability-based APIs and low-level correctness.
HN commenters link it as a source for bugs in hello world, WASI Preview 2 context, and ideas for evolving the WASI filesystem beyond preopens.
I am not sure either follows. But it depends how we even define "older languages", especially considering differences between python 3 and 2, are they the same age (based on the original python release) or are they treated for their respective release version?
Just taking some simple release dates [1] or wikipedia I found:
Ages of "Yes" group: 49, 36, 22, 26, 26, 12, 31
Ages of "No" group: 11, 14, 33, 7, 32, 45, 26, 34, 21
Averages: Yes 28.85, No 24.78
With the ambiguity around what "age" even means for the language here (e.g., counting the age of node.js or python) it is probably meaningless, but it seems well mixed independent of age.
[1] https://blog.sunfishcode.online/bugs-in-hello-world/
> reading from stdin isn’t challenging, nor writing to stdout.
Unless you're Kernighan and Ritchie, who semi-famously wrote a buggy hello world program and used it to educate a generation of C programmers: https://blog.sunfishcode.online/bugs-in-hello-world/
Obviously an exaggeration, but when's the last time you checked the return value of printf? I know I don't. And that's not even a memory safety bug, just basic logic. I hope nobody trusts those guys around malloc and free :)
Eyra is a new implementation of libc in Rust that addresses this in its default configuration:
"Eyra solves this by having setenv etc. just leak the old memory. That ensures that it stays valid for as long as any thread needs it. Granted, leaking isn't great, and Eyra makes it configurable with the threadsafe-setenv cargo feature, so it can be disabled in favor of the thread-unsafe implementation. "
https://blog.sunfishcode.online/eyra-does-the-impossible/
I'd like to see wasi:filesystem evolve beyond preopens (which would avoid "ghosts" like this) as described in this blog: https://blog.sunfishcode.online/capabilities-and-filesystems/
Another good write-up which gives more context to this release, and it touches on POSIX in relation to the component model.
https://blog.sunfishcode.online/wasi-preview2/
Depending on the language, this simple code actually has a bug:
https://blog.sunfishcode.online/bugs-in-hello-world/