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

That Linux drama was due to "nontechnical nonsense" of maintainers refusing to document their APIs requirements.

In C you can have a function that returns a pointer, and get no information how long that pointer is valid for, what is responsible for freeing it, whether it's safe to use from another thread. That's not only an obstacle for making a safe Rust API for it, that's also a problem for C programmers who don't want to just wing it and hope it won't crash.

The benefit of safe wrappers is that as a downstream user you don't need to manually check their requirements. They're encoded in the type system that the compiler checks for you. If it compiles, it's safe by Rust's definition. The safety rules are universal for all of Rust, which also makes it easier to understand the requirements, because they're not custom for each library or syscall. The wrappers boil it down to Rust's references, lifetimes, guards, markers, etc. that work the same everywhere.




> ... you only need to translate requirements of individual APIs to Rust's safety requirements...

> That Linux drama was due to "nontechnical nonsense" of maintainers refusing to document their APIs requirements.

> If those specifications were written down clearly enough then this dev wouldn't have needed to spend 5 days debugging...




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: