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

Meta-programming needs in Rust are addressed by macros. There's not really anything missing there compared to what C++ does via templates.


IMHO, you're a bit too far in the other direction; there are areas where we've been working on actively improving, and there are still some things that C++ folks really miss in Rust. Doesn't mean we'll add all of them, of course, but there is desire for more, for good reasons.


There are generics and dependent types. But these are still gaining features and not nearly as powerful as templates and SFINAE. (but way easier to understand)

Macros are an option but don't have access to the same type information so often they solve different problems.




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

Search: