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

As I understand, in low-level languages the concept of ownership exists anyway, no matter whether the language allows to declare it explicitly or not. Rust just makes you write it out explicitly.


Yes ownership exists, but the semantics of Rust's automatic ownership system are different as they're enforced as a linear type.


The only concept of ownership that exists in low level languages is that the kernel owns memory and gives your program a chunk of it. Aside from that I think the closest equivalent concept is the system break, but that just determines where in memory your stack and heap are divided.


Ownership doesn't exist in the C language per se, but it is still an important concept you have to reason about when manually managing memory. I think that's what GP meant.

E.g if you add some object to a generic hash table as a key by pointer, you better treat that pointer as being owned by the hash table and not mutate it, or interesting stuff will happen.


I mean sure, but we're not talking about C, we're talking about low-level languages, like IA32 assembly.


No one uses "low level language" to mean only assembler anymore. Besides, you also have to reason about ownership in assembler. It's not something you can really get away from at any level of the stack.




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

Search: