Live data from Hacker News

Garbage collection for Rust: The finalizer frontier

soft-dev.org

181–184 of 184 posts

Re: Garbage collection for Rust: The finalizer frontier

#181
post #174

Earlier quoted context omitted.

No. They may be larger because they are doing more work, depends on the program. But no they don’t statically compile everything.

Static compilation and static linking are two separate things - however, Rust is both statically compiled and (usually) uses static linking of dependency libraries.

You’re right. I mean static linking.

And by default Rust does not. Needs glibc.

Re: Garbage collection for Rust: The finalizer frontier

#182
post #125

Earlier quoted context omitted.

My comment is quite general. The difficulties with async/await seem to me to be with the fact that code execution starts and stops using "mysterious magic", and it is very hard for the compiler to know what is in, and what is out, of scope. I am by no means an expert on async/await, but I have programmed asynchronously for decades. I tried using async/await in Rust, Typescript and Dart. In Typescript and Dart I just…

Thank you for the kind words and the thoughtful response. I'm deeply sympathetic to your viewpoint, and some days I certainly feel like Rust is creaking under its own weight. Why does your typical backend web service need all this complexity with borrows and lifetimes and manual memory management? But allow me to present the other side of the argument. My background is in systems-level developer tools, and Rust has a…

> enums with data + exhaustive pattern matching; the latter is something even Haskell lacks

What do you mean? Haskell doesn’t lack any of those things.

Re: Garbage collection for Rust: The finalizer frontier

#183
post #182

Earlier quoted context omitted.

Thank you for the kind words and the thoughtful response. I'm deeply sympathetic to your viewpoint, and some days I certainly feel like Rust is creaking under its own weight. Why does your typical backend web service need all this complexity with borrows and lifetimes and manual memory management? But allow me to present the other side of the argument. My background is in systems-level developer tools, and Rust has a…

> enums with data + exhaustive pattern matching; the latter is something even Haskell lacks What do you mean? Haskell doesn’t lack any of those things.

Thanks, I was corrected about this on bsky — scratch that part.

Re: Garbage collection for Rust: The finalizer frontier

#184

For those who are interested, I think that arena allocation is an underrated approach to managing lifetimes of interconnected objects that works well with borrow checking.

I agree, but in my experience arena allocation in Rust leaves something to be desired. I wrote something about this here: https://blog.reverberate.org/2021/12/19/arenas-and-rust.html I was previously excited about this project which proposed to support arena allocation in the language in a more fundamental way: https://www.sophiajt.com/search-for-easier-safe-systems-prog... That effort was focused primarily on learna…

Thanks for those links. Have you tried using arenas that give out handles (sometimes indexes) instead of mutable references? It's less convenient and you're not leveraging borrow checking but I would imagine it supports Send well.
Post reply on HN