Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That has a cost both to the compiler and to the developer.

It's not a free win.



It’s part of the standard library, not the language, so it’s not really a cost to the compiler.

And this just uses all the same rules as normal Rust code, so like, sure, to use features you have to know them, but I find it a bit silly to frame that as a “cost.” If that’s a cost, so is literally everything.

Anyway my main point is just that you have less refount traffic than in other implementations.


If were going down the calling silly route, I'd rather categorize handwaving of Rusts additional complexities by their community as silly.

If "everything has a cost" anyway we might as well code is assembly for optimal performance. But no, because nuances and differences of cognitive load during development can be significant. And so does compilation speed.

It's arguably much easier to code with a GC and language adoption reflects that.


> I'd rather categorize handwaving of Rusts additional complexities by their community as silly.

I believe what steveklabnik meant, was that all this extra complexity (the borrow checker) already exists in the language for other reasons. It's not an additional cost to the compiler or the developer when using the reference-counted types (Rc or Arc).


That's correct. I thought we were talking specifically about refcount traffic, not about broader issues.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: