3 ms·
Vale's “generational references” sound like some kind of holy grail, which makes me worry I'm missing something. Surely someone has tried them before? Why aren'
by TazeTSchnitzel 3y ago
Vale's “generational references” sound like some kind of holy grail, which makes me worry I'm missing something. Surely someone has tried them before? Why aren't they already in common use? I think they would constrain memory allocation and promote heap fragmentation, which might be fine on a system with ample 64-bit address space, but could be troublesome for WebAssembly for example. They also don't seem like they avoid the concurrency issues that Rust's borrowing model can.
Also, it's unfortunate that Vale is one letter away from Vala.
- malkia 3y agoah! Reading about Vale, I was actually thinking about Vala, now I see! (I barely know Vala, just from compiling some GTK/Gnome related code).
- Findecanor 3y agoThere are also programming languages named "Dala" and "Dale". Dala and Vale are memory-safe. Vala and Dale are not.
- uzerfcwn 3y agoThere's also "Val", again banking on safety.
- flohofwoe 3y agoThe (related) idea of a generation counter combined with an index handle for spatial and temporal runtime memory safety has been quite popular recently in the gamedev space: - (shameless plug): https://floooh.github.io/2018/06/17/handles-vs-pointers.html https://floooh.github.io/2018/06/17/handles-vs-pointers.html - Seb Aaltonen's recent engine design presentation (search for "Fast & safe object lifetime tracking"): https://enginearchitecture.realtimerendering.com/downloads/reac2023_modern_mobile_rendering_at_hypehype.pdf https://enginearchitecture.realtimerendering.com/downloads/r... Some gamedev engines probably invented a similar concept in parallel over the last two decades. ...having things like this baked into the language is quite a bit nicer of course, and should allow for better performance.
- lenkite 3y agoIt was first explained in the Old (2000 published) Game Programming Gems book in the chapter titled: "A Generic Handle-Based Resource Manager".
- naasking 3y ago> It was first explained in the Old (2000 published) Game Programming Gems book in the chapter titled: "A Generic Handle-Based Resource Manager". It's much older than that. The capability-secure operating system EROS from the early 90s [1] used this technique in its capabilities. Capabilities were kernel-protected 64-bit numbers that mapped to system objects, and they carried a 16-bit generation index that was used to revoke the capability (basically a free operation). It might have even been used in its predecessor KeyKOS from the 80s, I don't recall at this point. [1] https://en.wikipedia.org/wiki/EROS_(microkernel) https://en.wikipedia.org/wiki/EROS_(microkernel)
- lenkite 3y agoHuh, didn't know that - thanks for the link. The very ambitious name for the OS - Extremely Reliable Operating System made me smile.