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

Ok, point taken, indeed it reads like that. However, in programming and generally in engineering this is a very useful concept. There is a difference between "component X is part of Y" than "component X works / interacts with Y" or "component X has exclusive access to Y in this particular span", similarly how it is often very important to know if "component X can be safely shared" - and Rust allows to express that, while languages like Java are quite blind to that.

Consider a simple Java method signature:

    public static MyCustomFileReader open(FileHandle someFile) { ... }
Who is responsible for closing the file after you're done with reading it? Does the returned reader close the file handle on close, or should I issue another close on the file handle afterwards? Can I open multiple readers on the same file? The only way to know is to check the javadoc comment, if someone took time to write it. In Rust there are no doubts like that.



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

Search: