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

What I would like to also see in these types of well written articles is the answer to questions like "what can you do with Rust that you can not do with C?"


Having to ask for permission to corrupt memory.


This may answer part of your question — it's focused on strings but draws parallels with C all along: https://fasterthanli.me/articles/working-with-strings-in-rus...


Most answers will focus on safety, but setting that aside, there's one thing Rust has which AFAIK C doesn't have: fat pointers. They're the implementation detail behind both array slices (keeping together the pointer to the first element and the length) and trait references (keeping together the pointer to the object and the pointer to the vtable).


Write code that is memory safe.




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

Search: