5 ms·
I was prepared to read the article and scoff at the author's misuse of std::fs. However, the article is a delightful succession of rabbit holes and mysteries. W
by royjacobs 3y ago
I was prepared to read the article and scoff at the author's misuse of std::fs. However, the article is a delightful succession of rabbit holes and mysteries. Well written and very interesting!
- zerr 3y ago[flagged]
- marcosdumay 3y agoIt's about making misuse difficult. Rust doesn't actually restrict much. It would take looking at lots of details, but my impression is that it's less restrictive than C.
- qerti 3y agoThe rust compiler refuses to compile code which doesn’t adhere to a strict set of rules guaranteeing memory safety. Unless you intentionally call an unsafe block, misuse in this sense is impossible, not just difficult.
- db48x 3y agoBut other types of misuse are not. For example, a naive program might do many reads into a small buffer instead of one read into a large buffer.
- Yoric 3y agoJust stating the obvious: breaking memory safety is only one subset of all the possible misuse available in the space of manners of using an API, data structure, etc.
- bri3d 3y agoThis was such a good article! The debugging was smart (writing test programs to peel each layer off), the conclusion was fascinating and unexpected, and the writing was clear and easy to follow.
- deleted 3y ago[deleted]