3 ms·
I suspect there are several interpretations of "feature" being used in these discussions, and without someone being a bit more explicit in what they mean, I dou
by kbenson 11y ago
I suspect there are several interpretations of "feature" being used in these discussions, and without someone being a bit more explicit in what they mean, I doubt much useful progress will be made.
I also think that complex languages may be harder for teams with high turnover or a lower average skill set within that language (and as such the average allowed complexity per expression may play a role in this). I went into some depth on this in a cousin thread[1], but my conclusion may not be quite the same as yours. Part (well, most actually) of my original question on this topic was to ask for clarification, because I thought the assertion was inherently ambiguous.
That said, if you have actual numbers or studies to bolster your statements about C++ I would love to see them. What you assert is a common refrain here, but I'm truly not sure how much of it is confirmation bias and squeaky wheel. There are plenty of C++ supporters as well as detractors, but I'm not sure how to sort through the noise here to get an accurate assessment of the landscape. Interestingly, my relative distance from C++ may actually help here since my own experiences may not sway me as much, but that might be entirely overshadowed by C++'s similarities and differences to other languages that I like or dislike in some aspect that I am more familiar with.
In the end, since it's not as simple as "less features us better, more features is worse" (otherwise we would all be writing assembly), I suspect there are a few other important axes of comparison that actually describe the situation better, and language features is a useful abstraction but only over a very short range of values, outside of which it becomes increasingly useless as a metric for how hard or easy it is to manage a codebase.
> BTW, today C++ is quite effective because it's become a (relative) niche language (even according to its creator). Niche languages are used by specialized teams that are good at enforcing discipline, and/or tend to be smaller.
Is it? I know there have been other systems eating into the market share for C++ for a while, but my impression has always been that it's still extremely popular in certain segments where there hasn't been much new competition for a while. E.g. high performance computation, cutting edge/AAA games, etc.
1: https://news.ycombinator.com/item?id=10292093 https://news.ycombinator.com/item?id=10292093
- dragonwriter 11y ago> I know there have been other systems eating into the market share for C++ for a while, but my impression has always been that it's still extremely popular in certain segments where there hasn't been much new competition for a while. "Extremely popular in certain segments" is typical of "niche languages" -- those segments are its niche(s).
- kbenson 11y agoYes, but "eating into the market share" doesn't necessarily mean it isn't still a heavy contender. I think we can agree that while Internet Explorer has been losing market share for quite a long while, you can't classify it as niche. In that respect, my original statement regarding it dominating some industries and your reply don't really affect the answer to the question of whether or not it's a relatively niche language. The blame is mostly mine though since you were responding to something I put forth that wasn't really relevant.
- AnimalMuppet 11y agoFine, but C++'s "niche" is larger than all but maybe four other language's total market share. So the word "niche" doesn't really fit very well...
- dragonwriter 11y ago> Fine, but C++'s "niche" is larger than all but maybe four other language's total market share. So the word "niche" doesn't really fit very well... If the niche is well-defined, the size doesn't really matter in many respects, because its effectively a completely different market, and it doesn't matter whether that markets large or small in terms of what goes on outside that market.
- pron 11y agoBut those four other language's total market share covers over 80% of the industry.
- AnimalMuppet 11y ago> In the end, since it's not as simple as "less features us better, more features is worse" (otherwise we would all be writing assembly)... Arguably, assembly is the most feature-full language - everything is possible. But those features are very expensive, which is why it's only used where there is no alternative.
- kbenson 11y agoWell, in that respect, every turing complete language is at feature parity, but I think the meaning of "feature" here for most people (I still think there's a few specific differences in people's interpretations) is "language construct making hard, complex to program construct or methodology more easily expressed through language level support." That is, both C and Perl can implement Hash data objects, but C requires a library or implementation, and Perl makes it a core data type of the language.
- AnimalMuppet 11y agoNo, assembly is more than turing complete. On many CPUs, you get instructions like "enter supervisor mode" or "flush the data caches" or "change the interrupt mask", which aren't part of the definition of a turing machine. (I know, floating-point multiplication isn't, either, but you're going to have to be able to do at least some kinds of arithmetic to implement a turing machine, whereas supervisor mode is completely outside the spec.) And C, Java, Perl, etc, also don't have anything like "enter supervisor mode". But if the CPU supports it, assembly will let you do it.
- kbenson 11y agoAgain, that depends entirely on how you define "feature". If the feature in question is "easy use of hashes as a built in data type" assembly doesn't have it. Yes, you can implement hashes in assembly, the the feature as outlined is not something you can ascribe to assembly. Additionally, assembly has a few features that are not replicated in most languages (but not all, some languages allow inlining assembly). So they are often just partially overlapping sets.
- pron 11y ago> if you have actual numbers or studies to bolster your statements about C++ I would love to see them. Note that most real-world case studies were done in the late '90s-early '00s so they are not that easy to find. A quick Google search, however, came up with this[1]. > There are plenty of C++ supporters as well as detractors It's not about C++ supporters and detractors today. It is an undisputed fact is that the industry as a whole abandoned C++ (except for its relevant niches) and practically no one has looked back. > In the end, since it's not as simple as "less features us better, more features is worse" I'm not saying it is simple. I am saying that we have one experiment with conclusive results. Perhaps there are other variables, but given the strength of the results, the burden of proof -- IMO -- lies with those who claim that their super-feature-rich language will not meet the same fate. > it's still extremely popular in certain segments It is, and those are its niches. They form a largeish share of the market, but not anywhere as large as the segments that used C++ in the 90s or the segments that use, say, Java today. It is most certainly no longer a general-purpose cross-market industry-wide language. [1]: http://www.lanl.gov/projects/CartaBlanca/webdocs/PhippsPaperOnJavaEfficiency.pdf http://www.lanl.gov/projects/CartaBlanca/webdocs/PhippsPaper...
- kbenson 11y agoThanks for the paper, I'll take a look. > the burden of proof -- IMO -- lies with those who claim that their super-feature-rich language will not meet the same fate. All you are doing is reducing the discussion to something so hand-wavey that it can't be argued anymore. I'm interested in how much is too much and what type of features increase tihs load. I assert that some features don't increase errors, but in fact decrease them (e.g. Java's automatic memory management), and if that's true, than the statement "more features is worse than less features" is trivially proven false. Is it really that hard to move the argument beyond the simplistic point of view that "features" are the problem?
- pron 11y agoAutomatic memory management is what's known as an extra-linguistic feature. Those usually reduce complexity (JITs do the same, as they allow very efficient compilation while introducing different dispatch kinds -- static vs. virtual -- with different performance). I was talking about language-level abstractions. For example overloading, operator overloading, having both subtyping and explicit sum-types, etc.. It is handwavy because designing languages is an art, but usually providing too many ways to achieve the same thing or allowing code that hides its operation (or appears to violate the "normal" language semantics while looking innocuous) is, in general, bad (for large teams), as it hinders readability. Of course, things need to be balanced, and you have to consider what kind of projects the language is for, what would be the "average" code size, etc..