|
|
|
|
|
by thom
1267 days ago
|
|
I've been getting back into C++ after an extremely long hiatus and I've been impressed by how thoroughly modern it is. The worst crime you're likely to commit these days is accidentally invoking a copy constructor more often than you want to, and even then, not actually creating leaks. In fact, the most striking thing coming from a language like Java or C# isn't memory management at all, is how utterly non-OO C++ actually is, especially the standard library. I understand how key the zero-cost tenet is in C++, but it's very alien to be picturing an interface and thinking you'd like an Iterable<char> or IEnumerable<char> there, but having to learn about iterators and traits and concepts etc. To be honest, there are equally many functional affordances in C++ as OO ones at this point, but the native core is generic programming, which is very idiosyncratic. |
|
You could definitely (?) implement a Java-like container framework, with class like Iterable<char> or IEnumerable<char> and almsot every OO bell and whistle - if you wanted to. But it would not be very useful.