3 ms·
The slow adoption of modern C++ is very apparent. Some things not event listed: forward, unique_ptr, shared_ptr, tuple, constexptr. nullptr is much lower than
by ddavis 10y ago
The slow adoption of modern C++ is very apparent. Some things not event listed: forward, unique_ptr, shared_ptr, tuple, constexptr. nullptr is much lower than NULL and move is quite low. These features are now 6+ years old! ;)
- mschuetz 10y agoSmart pointers realy need a native way to be specified, similar to how we use & to declare references and * for pointers. Filling your code with shared_ptr<Something> and the likes is just not going to win the majority over, even if it's useful.
- johannes1234321 10y agoA common way is having a "using FooPtr = shared_ptr<Foo>" somewhere and then only use FooPtr. This also reduces the occurrences in that word cloud.
- ddavis 10y ago> This also reduces the occurrences in that word cloud Ah, yes, very good point.
- ddavis 10y agoI agree it's made C++ a bit verbose, though something like the using keyword helps (which is 30 spots below typedef!)
- radupopescu 10y agoNowadays, you can do: auto sh_ptr = make_shared(....); // Since C++11 or auto uniq_ptr = make_unique(....); // Since C++14 It saves you from having to explicitly name the type parameter and you just need to pass in the parameters of the constructor. It's not as terse as & or *, but it's not that bad.