logoalt Hacker News

Rust Memory Management: Ownership vs. Reference Counting

35 pointsby vinhnxlast Saturday at 9:20 AM11 commentsview on HN

Comments

baranultoday at 10:18 AM

Rust is becoming less special in this area. Languages such as Dlang, Vlang, and Julia have added optional ownership and borrowing. As these offerings are optional, many can see this as greater programmer freedom to decide what to use for their projects, with languages that are easier to use or read.

show 3 replies
smallstepformantoday at 11:05 AM

This is all well and dandy for some usage scenarios but breaks in others, eg. scene graphs and GUI's.

A scene graph needs 2 mutable references, and has nothing to do with ownership. Same issue exists with GUI's. The pattern that Rust forces is to always request a reference, which incurs a performance penalty while retrieving the same reference again and again and again.

show 1 reply
ellie_kim98last Saturday at 9:46 AM

[dead]

jonathanstrangetoday at 8:52 AM

[flagged]

show 2 replies