Hacker News new | ask | show | jobs
by blakehawkins 1417 days ago
And way, way better compiler errors thanks to a sane generics system
2 comments

And much better compiler errors. `rustc` about leads the pack on error messages of all the languages I use regularly.
I think you meant thanks to a sane(r) macro system? Both Rust and C++ use monomorphisation for generics, I believe shitty compiler errors are due to C++'s templating.
I’m what way can you have ‘generics’ in C++ that are not based on templating? I am almost certain that any implementation of anything ‘generic’ templates are inherently involved. Maybe I’m wrong about what you mean by generics though.
There are concepts now which are close enough to Rust's traits.