9 ms·
> C++ has a daunting reputation because its fundamental elements nest so tightly together Do they? I tend to find that C++’s features are often quite disjoint,
by saagarjha 7y ago
> C++ has a daunting reputation because its fundamental elements nest so tightly together
Do they? I tend to find that C++’s features are often quite disjoint, which means that you can pick-and-choose which bits you want to use but the language isn’t quite designed like a coherent whole as some other languages are.
- pjmlp 7y agoAny language that grows big has that problem. My favourite example is Python, I started using it with version 1.6 and even though I only use it for small scripting tasks, always followed each release since then. It might appeal to beginners, but underneath lies a language as powerful as C++, where even the most savy will fail to remember what changed between minor releases.
- dgellow 7y ago> Any language that grows big has that problem. I'm also quite sure that we will see similar issues with other languages in the coming decades, with new paradigms becoming popular and existing languages trying to retrofit those in their design. C++ is one of the oldest and biggest (in term of usage) language that is still used for new projects and evolving, the competition is one or two decades younger, they still have plenty of time to evolve into monsters.
- pjmlp 7y agoHave you ever tried to answer C, Python, Perl, Java, C#, F#, VB.NET, OCaml, Haskell, JavaScript Quiz Pub questions? Many think that they know what they are using, but never bothered to actually read the language reference manual.
- shaklee3 7y agoAs much as a like python, it is not as powerful as c++. Hence the reason you have to use cython/cpython to improve performance.
- LBarret 7y agoPowerful doesn't mean fast. Python is quite slow but C++ is not powerful enough to make so many things usable without -comparatively- a lot of work. C++ is very fast and entrenched in a few markets ( gamedev, trading, etc) but that's it. As a language it is quite average, encumbered by too many features, too many corner cases.
- pjmlp 7y agoI was speaking about grammar and language semantics, not implementation.
- bayesian_horse 7y agoIt's not a coherent language because there are so many different compilers in use today. Many more modern Languages like Java, Python, Rust and Go have practically only one compiler/reference implementation and a couple of much less popular ones.
- makapuf 7y agoIf we're talking about the language, we're talking about the standard, of which there is only one. Having many different compilers (and legacy code!) can indeed render the process of standardization hard (but needed), and legacy code can cause certain features not to be deprecated, but having several compilers do not render the language coherent or not.
- bayesian_horse 7y agoHm, with "the language" I meant "as used". And standard-compliance does vary somewhat. On top of the compilers, there different sub-populations of programmers, being trained on different standards, different libraries, different sets of features. I'm not a proficient C++ programmer, but it appeared to me that there aren't that many programmers who know or even use the complete standard?
- pjc50 7y agoUnfortunately you can't feature-flag them off, and especially you can't automatically ban people from using all sorts of old unsafe constructs in your language, so for practical multi-contributor projects you have to be aware of all the features.