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

I think this is more a result of rust having good generics.

If c were built with good generics and memory management (not that garbage preprocessor stuff), I expect similarly expressive and good data-structures would be built.

C++ is an affirmation of this because it happens to have good libraries of data-structures which are not really very different from rust's.

I don't think this is as much "rust's design forces the coder to do this" and more "c makes it hard to do as nice of a design"



Right. In C, correctness is by convention, not enforced. C++ allows "userland" enforcement via RAII. There are, however, pieces of compiler magic partially outside the type system (const, &, &&) - you can't specify such behavior within C++. Rust does more of this magic in ownership. If you just want a particular instruction soup, all of them will get you there. It's a question of ergonomics, convenience and the kinds of compiler guarantees that we want.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: