3 ms·
> It's too bad that there's not a good way to have a broader way to switch between dialects within a project where in one place it's "this portion of the code i
by Tuna-Fish 3y ago
> It's too bad that there's not a good way to have a broader way to switch between dialects within a project where in one place it's "this portion of the code is perf-critical and carefully reviewed" and in another "this portion of the code is perf-oblivious and has lots of async state that's easy to get wrong". I've wondered if it's almost worth mixing two separate languages (like a GCed one for the latter) just to make the distinction clear.
You are describing Rust's "unsafe" keyword.
And this kind of code is very literally the original impetus of it. The language was sort of originally designed to implement a browser, after all.
- evmar 3y agoI have written a lot of Rust, and I am describing something different. Rust lets you write code that cares a lot about memory (with lifetimes etc.) with either compiler assistance or without. What I am describing is code that doesn't much care about memory and would be happy to sacrifice performance for it.
- pjmlp 3y agoThe use of unsafe in systems programming languages at very least goes all the way back to ESPOL and NEWP in 1961, with many other cases in between until Rust came to be.