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

This 'ownership' system is a pattern which is used informally in C, C++, and other languages with manual garbage collection—the idea that you have a bit of your program responsible for allocating and freeing memory, and another bit which merely uses it. Rust takes this pattern and has the compiler enforce it.

I suppose in some ways it makes programming more difficult, but it's also going to make low-level programming safer by virtue of the fact that certain invalid programs are no longer possible to express. Rust is one of very few languages which can offer that.

(Also, having used Rust a fair amount, I don't think it's actually that difficult once you're used to it. I can think of much more complicated programming features that have been present in popular languages for decades!)



For me, understanding Rust's type system has been far more complicated than understanding the ownership model. But that's likely because I have zero C, C++ or Haskell experience.


Has it been something about the type system in particular, or just keeping track of all the parts? I would not call it a simple language, but I think it's ultimately tractable, albeit with work.




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

Search: