News for hackers. Stuff that matters.
Re:Does the Bronze Garbage Collector Make Rust Easier to Use? by IshKebab on Thursday December 23, 2021 @05:28AM (#29660495)
> I'm convinced Rust is easier to write without the management of lifetimes in a short time span.

Yeah that's the problem with all these studies that use students writing new code for a few hours.

99% of coding isn't like that - it's reading other people's code (including code you wrote ages ago and can't remember), trying to figure out how it works, following complex call chains, debugging etc.

If you only look at Advent of Code type problems you'll come up with all sorts of strange conclusions, like static types don't make a difference, comments aren't useful at all, it doesn't matter if you exclusively use single character variable names, goto is totally harmless, etc. etc.

Though in this particular case I guess they didn't have much choice because there are no existing large programs written using Bronze.

Re:Does the Bronze Garbage Collector Make Rust Easier to Use? by Farmadupe on Thursday December 23, 2021 @05:56AM (#29660636)
I'm not 100% sure, but I think the OP was talking about the overhead of lifetime management for objects that don't live for a very long time. Or maybe objects that don't have "interesting" lives.

One example in my head individual strings that need to be constructed dynamically but live for the lifetime of the application (better to leak it with Box::leak or lazy_static! than pollute all code with lifetimes)

Another is writing in lifetimes for single purpose objects that live on the stack and might only ever get passed by ref into a single function and then get destroyed soon after.

Lifetimes are super important in rust and are a core part of the language, but in such degenerate cases they take up a lot of programmer effort for little benefit. In my head a "automatic" solution such as GC /could/ have a home in the language. Perhaps this would make rust a slightly better fit for really complex monolithic GUI apps (word processing, spreadsheets, CAD) where full GC would be performance-onerous but data lifetimes would be too complex for rust's strictly ordered lifetime concept

Re:Does the Bronze Garbage Collector Make Rust Easier to Use? by mcoblenz on Thursday December 23, 2021 @01:50PM (#29665075)
We were particularly interested in learnability for this study, which CAN be assessed in a study with students.