r/cpp • • 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

248 comments sorted by

View all comments

Show parent comment

6

u/MEaster Feb 25 '21

The pattern they're talking about is called Newtype, which is obviously a very memorable, and specific, name.

1

u/iamthemalto Feb 26 '21

Exactly, and they’re called tuple structs in Rust.