Hacker News new | past | comments | ask | show | jobs | submit login

> Absolute majority of the code written doesn't have hard real-time requirements, and should just rely GC as a safer and more convenient option

Yes.

Most Rust code deals with "trivial" lifetime issues -- not trivial in the the sense of how it gets used (usage can still be in a "serious" context, such as systems programming) but how the lifetime is controlled. Only certain models lend themselves to be expressed as "borrowing from an owner", and ref-counting will break with general object graphs.

Most garbage is gen-0, which gets recycled with little overhead, and when scavenging is needed its fairly quick and tunable these days and can optionally take advantage of multiple cores.

Another "trick" I see in Rust code is to use a symbol-table of sorts to represent object graphs using names and lookups, but you're just inventing your own, slower version of object references, and then there's the issue of who owns the graph symbol table, so you're only passing the buck in the general case.




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

Search: