2 ms·
The issue is not just architecture, it is also what you need to interact with. In my experience, if you're making practical applications that interact with the
by arghwhat 3y ago
The issue is not just architecture, it is also what you need to interact with.
In my experience, if you're making practical applications that interact with the outside world where this is not the case, it's because you're using libraries made of the broken dreams of it's authors, giving it's best to hide all the pain from you.
I tend to end up writing that code for system integration, so I don't get to see a world of pure type system bliss.
> That is to say, instead of saying that everything is a pointer, instead make an arena (an array) of allocations and use indexes into that array instead
An index into an arena is the very definition of a pointer, but I get the idea.
Unfortunately, you cannot redefine how to deal with types defined and allocated by C, nor how C should interpret and deference types allocated by Rust that must integrate into C-esque designs such as being a node in a C-defined linked list.
Teaching existing C to be anything else is not an option, but Rust is not - and is not meant to be - good a acting like C. The glue is not pretty to neither C nor Rust devs.
Zig is a middle ground that gives up some things from Rust in order to let C paradigms still work, while still having improvements.