4 ms·
I think it is fair to point out that it requires a comparatively high degree of skill and experience to use C++ well relative to many other languages. Most peop
by jandrewrogers 6y ago
I think it is fair to point out that it requires a comparatively high degree of skill and experience to use C++ well relative to many other languages. Most people do not use C++ well because doing so is quite difficult and requires a large investment of time. This is not helped by the fact that it has an enormous amount of legacy baggage that is technically valid code that no one should ever use — there is an entire anti-language you have to learn too. Its standard library has many flaws such that many experienced programmers eventually write and use their own alternatives to many parts of it. These are all legitimate hurdles and criticisms, it is neither a pretty nor easy language.
The major benefit of C++ is that with sufficient mastery you can do complex things strictly, safely, and concisely that are difficult-to-impossible in any other systems language due to its flexibility and metaprogramming facilities. Its flaws are very real, but so are its strengths.
- dgs_sgd 6y agoAs someone not very acquainted with C++ I was under the impression that the vast standard library was one of the great selling points of the language. What are some examples of defects that force programmers to rewrite parts of it?
- saagarjha 6y agoThe standard library is quite good, but is designed to be fairly general. Sometimes this means that you can do better with something you write yourself.
- jcelerier 6y agodepends where you come from. If you come from Python, Java, you'll find that there's a lack of support for networking, etc. and that it is not vast at all. After all we lack a W3CEndpointReferenceBuilder (https://docs.oracle.com/javase/10/docs/api/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.html https://docs.oracle.com/javase/10/docs/api/javax/xml/ws/wsad...).... not sure how it's possible to be productive without that. If you come from C you'll think that there are allocations everywhere and judge it unfit for purpose (even if in my experience, C libraries and software tend to allocate much more than C++, and use worse datastructures like linked lists, etc. just because it's easier to code in C). Finally the C++ committee and standard library implementers refuses to break ABI / API, which means that : * the C++ standard is not able to follow the state-of-the-art for e.g. hash maps, as the fastest hash maps (if you only care about speed of insertion / retrieval, which is let's be honest 99.5% of the use cases out there) because unordered_map has strict requirements that these newer hash maps do not satisfy. * things like regex stay broken
- gypsyharlot 6y agoLet's not confuse this with skill, though. I think ego is the reason why this has been allowed to go on for this long... The "skill" is mainly pointless memorization of a bunch of idioms. I've attended C++ training with committee members that have made C++ their life... and it was quite discouraging to see that even they do: Let's try this... oh, that didn't work. Let's try this... hmm, right. I know what this is, I've seen it before. Now, it works.