Hacker News new | ask | show | jobs
by zanderwohl 514 days ago
It would be a tremendous amount of work, and would take years. Meanwhile, the problems are avoidable. It's not exactly the "rust way" to just remember and avoid problems, but everything in language design is compromises.
1 comments

"Impossibru!!"

https://github.com/sunfishcode/eyra

Oh look:

> Why use Eyra? It fixes Rust's set_var unsoundness issue. The environment-variable implementation leaks memory internally (it is optional, but enabled by default), so setenv etc. are thread-safe.

> Why not use Eyra?

Well, that's a lot of caveats. As I said, it would take years to complete. And it looks like it's well on its way but not near complete.

If I understand it correctly this still doesnt help with downstream dependencies.
That's quite a trade-off
I think glibc made the same trade-off. It makes sense for most types of programs, but there's certainly a lot of classes of programs that wouldn't take it.
What is? Leaking memory? It's going to be a few kB at absolute most. Not an issue unless you are doing something very weird.
That only works on Linux though right?