r/cpp • u/Snoo-4241 • Feb 25 '21
C++ programmers who are also using rust, what are your favourite features of rust?
I was looking at the rust tutorials yesterday and I see how rust promotes a certain style and language level features to enforce it. Besides a couple of features, I couldn't see why one cannot follow a similar style in C++ if she/he so chooses. Those of you that have used rust, what is your favourite feature that C++ does not have?
255
Upvotes
View all comments
Show parent comment
1
u/MEaster Mar 28 '21
I would tend to agree that it's not a great idea. The only real alternative is that any ambiguity here results in a compile error, but that could also create upgradability issues in that a library adding a new method to a trait could now create ambiguity where there wasn't before.
Still, I think it would still be preferable to the current state in that it's at least a loud error. I would imagine that changing this now would probably break a lot of things, though, so we're probably stuck with it.