Jump to content

Talk:C++/Archive 12

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 5Archive 10Archive 11Archive 12

paragraph regarding C++ Exception Handling was removed

After 16 years of the availability of C++ Exception Handling this page did not mention anything about it. I added a paragraph. My edit certainly reflected that this is still today a hotly contested & emotional subject for a majority of C++ programmers outside of boost or the C++ standard library. My edit was removed. I hope that somebody else will undo the removal or write some paragraph by himself about the same subject. This should certainly contain some mentioning about the phobia which still exists regarding this subject in the majority of people which make their money with C++. ExcessPhase (talk) 19:14, 7 November 2012 (UTC)

That's great. Show your sources. And I continue to strongly recommend abandoning the hyperbolic term "phobia". Nobody on this planet has a clinically diagnosable phobia of exception handling. —chaos5023 (talk) 21:02, 7 November 2012 (UTC)

Talks which exhibit such a phobia usually don't make it into the public, because these people are rightly ashamed of themselfs -- if not now, than in a couple of years. And that somebody questions my authority regarding this subject pisses me off. Gehabt Euch wohl!

http://stackoverflow.com/questions/5426708/why-are-exceptions-so-rarely-used-in-c http://stackoverflow.com/questions/3490106/we-do-not-use-c-exceptions-whats-the-alternative-let-it-crash http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Exceptions — Preceding unsigned comment added by 192.73.228.23 (talk) 21:43, 7 November 2012 (UTC)

It's possible that "phobia" has a more restricted meaning in English than "phobie" has in German. You may wish to review the article Phobia.
As to questioning your authority, yes, that's a problem subject matter experts routinely have with Wikipedia that makes them unhappy engaging with it. The painful truth of the matter is, though, that Wikipedia's policy on verifiability means that your personal knowledge counts for nothing in and of itself; what matters is what you can source (though of course your personal knowledge helps you figure out what you can say that's verifiable). If you aren't willing to go to the effort of working from verifiable, reliable sources, though, I'm very much afraid you're likely to find your contributions continuing to be unwelcome.
The StackOverflow posts you link to are textbook examples of things that are not reliable sources and so not useful for verifiability purposes. The only way the Google Code policy document would demonstrate anything relevant is if you concluded by WP:SYNTHESIS that Google suffers from a phobia of exceptions, since all it says is that they don't use them. —chaos5023 (talk) 21:49, 7 November 2012 (UTC)

I'd like to introduce the Template:Version template to Wikipedia with the goal to establish one standard for version history tables (or lists). It simplifies creation of release histories, standardizes release stages and makes the content more accessible. Please comment on the template talk page (there already is some discussion). Thanks for your contribution. Jesus Presley (talk) 07:09, 28 November 2012 (UTC)

Critique by Matt Weisfeld

How is that even critique? Unless object orientedness is some ultimate holy grail, theres nothing wrong with being _not_ object oriented. This should probably be moved elswhere in the article, any thoughts where? Kyle2^32-1 (talk) 20:19, 26 August 2012 (UTC)

C++ contains all necessary OO features, but isn't 'pure OO', which is what the quotes were talking about of C++, no, there is no benefit to being purely OO, being multi paradigm is beneficial as it allows programmers to express ideas in the way of their preference, for some that is OO, and in ways impossible in 'pure OO', which can be, and are often are, more efficient and readable than what can be expressed in 'pure OO'. MThinkCpp (talk) 17:54, 29 May 2013 (UTC)
Nearly all modern programming languages enforce some paradigms. (Python enforces indentation Java explicit casting...) This increases readability because you don't have think on every code you read in a other way, since every person has other preferences. A other aspect is that many people (the majority) think that a good programming language has to protect the programmer from making big mistakes (google for "do programmers need seat belts") You will find many people who think different but you can't say all these famous computer scientist telling only bullshit. --Fabiwanne (talk) 21:47, 7 July 2013 (UTC)
You appear to be confusing "computer scientist" and "famous programmer". They're not the same. Matt Weisfeld, by the way, appears to be neither. TEDickey (talk) 21:53, 7 July 2013 (UTC)

Ken Thompson quote in Criticism

This recent edit was just reverted out of the Criticism section as "WP:Soapbox comments". It looks legitimate to me, and a better inclusion than either Weisfeld's and Kay's quotes, which are both redundant to the second paragraph in the section and would be better placed as refs to it instead of being quoted in full. (Not to mention the Torvalds comment, which isn't criticism at all, but merely an opinion that it's "horrible". It's like having a cricitism section in Broccoli with George Bush's quote about not having to eat it anymore since he became president.) 74.74.150.139 (talk) 22:56, 7 January 2013 (UTC)

The quote was more along the lines of criticism of Stroustrup than relating to the language design itself. Keep in mind that this is a topic about the language TEDickey (talk) 23:13, 7 January 2013 (UTC)

Renaming "Etymology" section to "Derivation of the name C++"

Though etymology is a perfect heading, it may be quite difficult for some people to understand. Changing it to a suitable easily understandable heading is suggested. SmackoVector (talk) 11:08, 18 August 2013 (UTC)


Implementation language???

Seriously, do u guys think that C++ is implemented in C? :| (same thing about java even if that's not the right place to talk about that...) — Preceding unsigned comment added by 93.48.134.18 (talk) 20:56, 13 December 2012 (UTC)

Wrong place for this question, C++ implementation language is implementation defined (i.e. could be C or C++, etc.)MThinkCpp (talk) 17:49, 29 May 2013 (UTC)

C was used to make the first compiler for C++ then was used to develop itself. Titamation (talk) 21:34, 13 August 2013 (UTC)

A reliable source is still lacking TEDickey (talk) 09:19, 14 August 2013 (UTC)
How about http://www.stroustrup.com/hopl2.pdf, page 19, line 12 'so that the very first working C++ compiler was done in C++'. MThinkCpp (talk) 09:42, 15 August 2013 (UTC)

Bjarne talks about the creation of c++ here Titamation (talk) 22:38, 14 August 2013 (UTC)

That doesn't match your statement above (Bjarne states that he wrote an intermediate stage which was not exactly C or C++) TEDickey (talk) 23:01, 14 August 2013 (UTC)

C++ was originally implemented using Cfront to create C-code. See http://en.wikipedia.org/wiki/Cfront — Preceding unsigned comment added by 81.170.169.35 (talk) 23:58, 19 October 2013 (UTC)

Exception Handling

I see that there is still no paragraph regarding exception handling. Embarrassing. See the paragraph I wrote some time ago: http://en.wikipedia.org/w/index.php?title=C%2B%2B&oldid=530499768 — Preceding unsigned comment added by 192.73.228.23 (talk) 21:35, 22 October 2013 (UTC)

Implementation language???

Seriously, do u guys think that C++ is implemented in C? :| (same thing about java even if that's not the right place to talk about that...) — Preceding unsigned comment added by 93.48.134.18 (talk) 20:56, 13 December 2012 (UTC)

Wrong place for this question, C++ implementation language is implementation defined (i.e. could be C or C++, etc.)MThinkCpp (talk) 17:49, 29 May 2013 (UTC)

C was used to make the first compiler for C++ then was used to develop itself. Titamation (talk) 21:34, 13 August 2013 (UTC)

A reliable source is still lacking TEDickey (talk) 09:19, 14 August 2013 (UTC)
How about http://www.stroustrup.com/hopl2.pdf, page 19, line 12 'so that the very first working C++ compiler was done in C++'. MThinkCpp (talk) 09:42, 15 August 2013 (UTC)

Bjarne talks about the creation of c++ here Titamation (talk) 22:38, 14 August 2013 (UTC)

That doesn't match your statement above (Bjarne states that he wrote an intermediate stage which was not exactly C or C++) TEDickey (talk) 23:01, 14 August 2013 (UTC)

C++ was originally implemented using Cfront to create C-code. See http://en.wikipedia.org/wiki/Cfront — Preceding unsigned comment added by 81.170.169.35 (talk) 23:58, 19 October 2013 (UTC)

Exception Handling

I see that there is still no paragraph regarding exception handling. Embarrassing. See the paragraph I wrote some time ago: http://en.wikipedia.org/w/index.php?title=C%2B%2B&oldid=530499768 — Preceding unsigned comment added by 192.73.228.23 (talk) 21:35, 22 October 2013 (UTC)

Remove dialects in infobox?

Are there any objections to the dialects being removed from the infobox. The primary motivation to remove them is that the C++ ISO committe discourages them, as does the creator of C++ see [1] page 30, paragraph 2 (ignoring the end of a paragraph at the top of the page) mthinkcpp (talk) 17:10, 26 October 2013 (UTC)

Removed. mthinkcpp (talk) 12:15, 27 October 2013 (UTC)

"Influenced by" section

Many other pages about programming languages have an "Influenced by" section in that box on the right. C++ could have that too, containing at least C and Simula. Unfortunately the article is locked so I cannot add it. — Preceding unsigned comment added by 46.249.133.113 (talk) 10:46, 1 October 2013 (UTC)

There isn't enough content to create a section (other than a list of a couple of languages) for it (though if you do have the content, post it here for approval) - the necessary details of C++'s ancestors are covered in the C++#History. The article is locked because of vandalism, to (indirectly) edit a locked page, see Wikipedia:PROTECT#Semi-protection. MThinkCpp (talk) 16:12, 1 October 2013 (UTC)
I don't know why the information box doesn't have this information, though. I added it based on information from the History section:
"Besides C and Simula, some other languages that inspired him were ALGOL 68, Ada, CLU and ML." Abstractematics (talk) 19:46, 1 November 2013 (UTC)

garbage collection in C++?????

Garbage collection is not necessary in C++ as there is RAII. Quite ridiculous!!! — Preceding unsigned comment added by 166.137.191.32 (talk) 02:39, 22 November 2013 (UTC)

Not necessarily. Consider cyclic references, for instance. Much easier to deal with on a GC rather than smart-pointer level... -Sebastian Garth (talk) 07:19, 22 November 2013 (UTC)

parser section is really not necessary here

most people want to use C++ not rewrite it... — Preceding unsigned comment added by ExcessPhase (talkcontribs) 02:39, 10 February 2014 (UTC)

Semi-protected edit request on 26 February 2014

In section 2.6-Exception handling, the first sentence is missing an 'a'. It should be "Exception handling is a mechanism..." and not "Exception handling is mechanism..." Staroobula (talk) 01:13, 26 February 2014 (UTC)

Done{{U|Technical 13}} (tec) 01:18, 26 February 2014 (UTC)

Removed Criticism

Mthinkcpp has removed almost all criticism. Since he has contributed much good things I don't think he made this in bad faith. But also C++ seems for HIM to be the best programming language as it is. There can be valid criticism. So I would like to redo his changes. --Fabiwanne (talk)

The lack of a proper criticism section and the general fanboyism of this article is extremely unfortunate. The reader is left with the impression that C++ can't "take the heat". It'd be much better to list the problems of C++ and let the readers decide. Mkcmkc (talk) 00:35, 10 August 2013 (UTC)
The criticism section in any article and specially in this one is indispensable. All programming languages are subject to criticism in real life. I think the reader at least should know that there are many things/facts such as the list mentioned here: http://yosefk.com/c++fqa/defective.html in which C++ has been challenged/criticised. And those are some of the reasons why there are a plethora of other languages out there (Java, C#, D, Go, etc) which were born trying to address some/all of that concerns, and the reason why the C++ standard is still evolving. Alcides fp (talk) 02:44, 16 September 2013 (UTC)
Criticism sections are not indispensable, it's actually quite the opposite and discouraged by WP policy. WP:CSECTION. Also that link (yosefk) is opinions an original research and has no place here. Criticism should be used throughout or not at all. Splitting the point of view into a section is generally a bad idea. Beakermeep (talk) —Preceding undated comment added 02:14, 20 October 2013 (UTC)
I never said the list here was authoritative I only mentioned it as an example of some topics that could/should be included in a serious Criticism section in *this* article. By the way, articles on languages such as Pascal, Java and even Haskell all of them have a Criticism section, in fact Java has a whole article on it. So I can't see the reason why this article shouldn't have one.AlcidesFP (talk) 19:11, 1 April 2014 (UTC)
While a criticism of C++ has been re-added, it really seems self-serving. Flexibility in mixing paradigms is NOT why C++ is generally criticized (other languages which do so, such as Python, are celebrated for it). Inconsistency (i.e. the static keyword) due to organic growth from C, difficulty in parsing the grammar (and therefore creating compilers/tools), flaws in the standard library (i.e. std::string intended but not suitable for COW), verbosity of high-level patterns (implementing an container can be quite a feat), are all examples of legitimate criticisms. I'd think the section should be made more robust or removed - right now it's a mockery of the word "criticism." — Preceding unsigned comment added by 68.33.220.238 (talk) 14:09, 20 October 2013 (UTC)
Mixing paradigms was an attribute in C++ which was explicitly chosen. So many people love it for that. But this has bad sides too. In fact it's one of the things that you recognize at first when you learn C++. Since there are many paradigms you have to learn all and find out the right ones if you want to understand C++-Code. So there are other languages (like Java) which explicitly prevent you from using "the wrong" paradigms. In fact the most programming languages do this. Other languages which explicitly allow many paradigms are criticized for this too. (See perl.) --Fabiwanne (talk) 11:23, 18 January 2014 (UTC)
There are a lot of criticisms you can make about C++, and a lot you can make about any language. If you're going to make a list of criticisms about C++, then you should about every programming language; and while maybe feasible, would not be useful if only because a normal reader of wikipedia article could not be expected to judge the relevance of the criticisms. For example, I'm a C++ programmer and the "std::string intended but not suitable for COW" criticism is perhaps true, but doesn't affect the software I write in any meaningful way. Furthermore, the article as it was said that C++ was "compared unfavorably" for reasons that I would consider one of C++'s best qualities njaard (talk) 18:05, 22 October 2013 (UTC)
Side note: the link has appeared before in a previous criticisms discussion Talk:C++/Archive_10#Criticism - and been marked as no use/biased/inaccurate Talk:C++/Archive_10#Do_we_need_this_retarded_criticism_page.3F, several times. mthinkcpp (talk) 13:13, 2 November 2013 (UTC)

Still no mentioning of C++ Exception Handling -- embarrassing

After nearly 20 years (18 to be correct) of working implementations of C++ Exception Handling this "encyclopedia" does not mention anything regarding it. Embarrassing. If you look in the history of the page, you'll find the paragraph I added some time ago (http://en.wikipedia.org/w/index.php?title=C%2B%2B&oldid=521857592), which was removed, as I did not provide any references (I'm not aware of any). — Preceding unsigned comment added by 192.73.228.23 (talk) 18:50, 5 February 2014 (UTC)

Exception handling is a feature present in many languages at this point. With that in mind, is there any particular reason why the page on C++ needs a section about it? Novusuna talk 19:27, 5 February 2014 (UTC)
The same reason why other major features of C++ are being mentioned in this article. — Preceding unsigned comment added by 192.73.228.23 (talk) 20:30, 5 February 2014 (UTC)
I agree with 192.xxx. C++ exceptions are significant enough to warrant a section under "Language", if not an article on its own. decltype (talk) 09:40, 7 February 2014 (UTC)
Finally somebody started. And maybe it does not get deleted by some exception phobic person. I added a one clarification (regarding handler -- which many people (including me) confuse with something being called from the place of error (like signal handler) -- but exception handling is about stack/scope unrolling). Feel free to change this to express it better. I think what also needs to be here:
  • only using C++ Exception Handling one can abort a constructor. Thus fallible resource allocations can now be put into a constructor AND any following code (another constructor) can rely on that the previous one was successful. Potentially compare to two-step-construction which was used before C++ Exception Handling.
  • if-less programming -- code is written for the everything-until-now-worked case
  • real word scenarios -- don't deal with programming mistakes like range overflow but system errors returned by system calls
  • example scenario of an object, which needs 10 different types of resources to be allocated in the constructor(s). Reporting any failed allocation to the caller. Deallocation in the constructors. With and without C++ Exception Handling.
  • compare to eating up/ignoring error codes. Example could be some C code using printf() and not reporting the error from printf() to the caller of the code resulting in developers having to use a debugger to find out what is failing and where. — Preceding unsigned comment added by ExcessPhase (talkcontribs) 02:37, 10 February 2014 (UTC)

The demonstration of exception handling to catch programming bugs like index-out-of-bounds error, is not helping people to appreciate exception handling. At least one could mention, that the constructor of the vector could also throw AND that the code after the constructor will only be executed, if the constructor was successful. The if-less programming style enabled by exception handling needs to be demonstrated. Better would be to show a series of system calls, which depend on each other, with every one potentially failing. Including RAII:

  • open file
  • mmap (only done if preceding open was successful)
  • close file (only done if preceding open was successful)
  • count number of newlines (only done if preceding mmap was successful)
  • munmap (only done if preceding mmap was successful)

(lifetime of open-close object shortened by using an boost::optional) — Preceding unsigned comment added by 192.73.228.23 (talk) 23:21, 9 May 2014 (UTC)

"Unknown errors can be caught"...

Wrong. Errors cannot be caught. Unknown types of exceptions can be caught... — Preceding unsigned comment added by ExcessPhase (talkcontribs) 22:15, 25 May 2014 (UTC)

Fixed. mthinkcpp (talk) 13:22, 26 May 2014 (UTC)

compatibility to C

There is no need to have a paragraph regarding compatibility with other languages (including C) here. C++ is meanwhile a separate language. That it once was a superset of the then existing C is only of historical importance.ExcessPhase (talk) 22:07, 25 May 2014 (UTC)

Bjarne Stroustrup considers it worth mentioning, he devotes a chapter to it in The C++ Programming Language (advanced) and Programming Principles and Practice (Beginners). I have removed the C++11 list though, and transferred it to the C++11 page (as it is better suited there). mthinkcpp (talk) 13:34, 26 May 2014 (UTC)

Semi-protected edit request on 8 July 2014

Typo in the first sentence of 'Static storage duration objects': Static storage duration objects are _____create____ before main()... 93.120.189.135 (talk) 15:21, 8 July 2014 (UTC)

Done{{U|Technical 13}} (etc) 20:35, 9 July 2014 (UTC)

Semi-protected edit request on 22 July 2014

The Hello World example should return something as it`s int.

80.54.47.220 (talk) 12:47, 22 July 2014 (UTC)

The reference does not include that (return 0;), please see it (Book: The C++ Programming Language 3rd or 4th edition) for an explanation why. mthinkcpp (talk) 14:57, 22 July 2014 (UTC)

Turing complete

Why does it say "turing complete" in the description of templates. A template cannot run any expression a computer can compute at compile time. Who the hell has got turing complete in their head that side and keeps typing "turing complete" on anything to do with software. So what, who cares? move it to a philosophy page about the topic instead. It is nonsensical garbage. — Preceding unsigned comment added by 41.8.216.58 (talk) 18:55, 3 July 2014 (UTC)

Template metaprogramming is in fact Turing Complete. This is quite important, as it shows the complexity of C++ templates. Check out this book: "C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond". Smk65536 (talk) 03:29, 24 July 2014 (UTC)

Shouldn't there be something here (ie., much more) about the controversies surrounding C++?

For example, some of the things attributed to Bjarne Stroustrup during an interview with the IEEE’s ‘Computer’ magazine, as published here:

http://harmful.cat-v.org/software/c++/I_did_it_for_you_all

If this is true, it is utterly shocking: it presents C++ as a language designed entirely as a way to extract money for programmers from their employees.

Actually, I may as well paste it here in case that webpage ever gets taken down. So here goes...

"On the 1st of January, 1998, Bjarne Stroustrup gave an interview to the IEEE’s ‘Computer’ magazine..

Naturally, the editors thought he would be giving a retrospective view of seven years of object-oriented design, using the language he created.

By the end of the interview, the interviewer got more than he had bargained for and, subsequently, the editor decided to suppress its contents, ‘for the good of the industry’ but, as with many of these things, there was a leak..

Here is a complete transcript of what was was said, unedited, and unrehearsed, so it isn’t as neat as planned interviews..

You will find it interesting….

   Interviewer: Well, it’s been a few years since you changed the world of software design, how does it feel, looking back?
   Stroustrup: Actually, I was thinking about those days, just before you arrived. Do you remember? Everyone was writing ‘C’ and, the trouble was, they were pretty damn good at it.. Universities got pretty good at teaching it, too. They were turning out competent – I stress the word ‘competent’ – graduates at a phenomenal rate. That’s what caused the problem..
   Interviewer: Problem?
   Stroustrup: Yes, problem. Remember when everyone wrote Cobol?
   Interviewer: Of course, I did too
   Stroustrup: Well, in the beginning, these guys were like demi-gods. Their salaries were high, and they were treated like royalty..
   Interviewer: Those were the days, eh?
   Stroustrup: Right. So what happened? IBM got sick of it, and invested millions in training programmers, till they were a dime a dozen..
   Interviewer: That’s why I got out. Salaries dropped within a year, to the point where being a journalist actually paid better..
   Stroustrup: Exactly. Well, the same happened with ‘C’ programmers..
   Interviewer: I see, but what’s the point?
   Stroustrup: Well, one day, when I was sitting in my office, I thought of this little scheme, which would redress the balance a little. I thought ‘I wonder what would happen, if there were a language so complicated, so difficult to learn, that nobody would ever be able to swamp the market with programmers? Actually, I got some of the ideas from X10, you know, X windows. That was such a bitch of a graphics system, that it only just ran on those Sun 3/60 things.. They had all the ingredients for what I wanted. A really ridiculously complex syntax, obscure functions, and pseudo-OO structure. Even now, nobody writes raw X-windows code. Motif is the only way to go if you want to retain your sanity..
   Interviewer: You’re kidding…?
   Stroustrup: Not a bit of it. In fact, there was another problem.. Unix was written in ‘C’, which meant that any ‘C’ programmer could very easily become a systems programmer. Remember what a mainframe systems programmer used to earn?
   Interviewer: You bet I do, that’s what I used to do..
   Stroustrup: OK, so this new language had to divorce itself from Unix, by hiding all the system calls that bound the two together so nicely. This would enable guys who only knew about DOS to earn a decent living too..
   Interviewer: I don’t believe you said that….
   Stroustrup: Well, it’s been long enough, now, and I believe most people have figured out for themselves that C++ is a waste of time but, I must say, it’s taken them a lot longer than I thought it would..
   Interviewer: So how exactly did you do it?
   Stroustrup: It was only supposed to be a joke, I never thought people would take the book seriously. Anyone with half a brain can see that object-oriented programming is counter-intuitive, illogical and inefficient..
   Interviewer: What?
   Stroustrup: And as for ’re-useable code' – when did you ever hear of a company re-using its code?
   Interviewer: Well, never, actually, but….
   Stroustrup: There you are then. Mind you, a few tried, in the early days. There was this Oregon company – Mentor Graphics, I think they were called – really caught a cold trying to rewrite everything in C++ in about ‘90 or '91. I felt sorry for them really, but I thought people would learn from their mistakes..
   Interviewer: Obviously, they didn’t?
   Stroustrup: Not in the slightest. Trouble is, most companies hush-up all their major blunders, and explaining a $30 million loss to the shareholders would have been difficult.. Give them their due, though, they made it work in the end..
   Interviewer: They did? Well, there you are then, it proves O-O works..
   Stroustrup: Well, almost. The executable was so huge, it took five minutes to load, on an HP workstation, with 128MB of RAM. Then it ran like treacle. Actually, I thought this would be a major stumbling-block, and I’d get found out within a week, but nobody cared. Sun and HP were only too glad to sell enormously powerful boxes, with huge resources just to run trivial programs. You know, when we had our first C++ compiler, at AT&T, I compiled ‘Hello World’, and couldn’t believe the size of the executable. 2.1MB
   Interviewer: What? Well, compilers have come a long way, since then..
   Stroustrup: They have? Try it on the latest version of g++ – you won’t get much change out of half a megabyte. Also, there are several quite recent examples for you, from all over the world. British Telecom had a major disaster on their hands but, luckily, managed to scrap the whole thing and start again. They were luckier than Australian Telecom. Now I hear that Siemens is building a dinosaur, and getting more and more worried as the size of the hardware gets bigger, to accommodate the executables. Isn’t multiple inheritance a joy?
   Interviewer: Yes, but C++ is basically a sound language..
   Stroustrup: You really believe that, don’t you? Have you ever sat down and worked on a C++ project? Here’s what happens: First, I’ve put in enough pitfalls to make sure that only the most trivial projects will work first time. Take operator overloading. At the end of the project, almost every module has it, usually, because guys feel they really should do it, as it was in their training course. The same operator then means something totally different in every module. Try pulling that lot together, when you have a hundred or so modules. And as for data hiding. God, I sometimes can’t help laughing when I hear about the problems companies have making their modules talk to each other. I think the word ‘synergistic’ was specially invented to twist the knife in a project manager’s ribs..
   Interviewer: I have to say, I’m beginning to be quite appalled at all this. You say you did it to raise programmers' salaries? That’s obscene..
   Stroustrup: Not really. Everyone has a choice. I didn’t expect the thing to get so much out of hand. Anyway, I basically succeeded. C++ is dying off now, but programmers still get high salaries – especially those poor devils who have to maintain all this crap. You do realise, it’s impossible to maintain a large C++ software module if you didn’t actually write it?
   Interviewer: How come?
   Stroustrup: You are out of touch, aren’t you? Remember the typedef?
   Interviewer: Yes, of course..
   Stroustrup: Remember how long it took to grope through the header files only to find that ‘RoofRaised’ was a double precision number? Well, imagine how long it takes to find all the implicit typedefs in all the Classes in a major project..
   Interviewer: So how do you reckon you’ve succeeded?
   Stroustrup: Remember the length of the average-sized ‘C’ project? About 6 months. Not nearly long enough for a guy with a wife and kids to earn enough to have a decent standard of living. Take the same project, design it in C++ and what do you get? I’ll tell you. One to two years. Isn’t that great? All that job security, just through one mistake of judgment. And another thing. The universities haven’t been teaching ‘C’ for such a long time, there’s now a shortage of decent ‘C’ programmers. Especially those who know anything about Unix systems programming. How many guys would know what to do with ‘malloc’, when they’ve used ‘new’ all these years – and never bothered to check the return code. In fact, most C++ programmers throw away their return codes. Whatever happened to good ol' ‘-1’? At least you knew you had an error, without bogging the thing down in all that ‘throw’ ‘catch’ ‘try’ stuff..
   Interviewer: But, surely, inheritance does save a lot of time?
   Stroustrup: Does it? Have you ever noticed the difference between a ‘C’ project plan, and a C++ project plan? The planning stage for a C++ project is three times as long. Precisely to make sure that everything which should be inherited is, and what shouldn’t isn’t. Then, they still get it wrong.. Whoever heard of memory leaks in a ‘C’ program? Now finding them is a major industry. Most companies give up, and send the product out, knowing it leaks like a sieve, simply to avoid the expense of tracking them all down..
   Interviewer: There are tools…..
   Stroustrup: Most of which were written in C++.
   Interviewer: If we publish this, you’ll probably get lynched, you do realise that?
   Stroustrup: I doubt it. As I said, C++ is way past its peak now, and no company in its right mind would start a C++ project without a pilot trial. That should convince them that it’s the road to disaster. If not, they deserve all they get.. You know, I tried to convince Dennis Ritchie to rewrite Unix in C++..
   Interviewer: Oh my God. What did he say?
   Stroustrup: Well, luckily, he has a good sense of humor. I think both he and Brian figured out what I was doing, in the early days, but never let on. He said he’d help me write a C++ version of DOS, if I was interested..
   Interviewer: Were you?
   Stroustrup: Actually, I did write DOS in C++, I’ll give you a demo when we’re through. I have it running on a Sparc 20 in the computer room. Goes like a rocket on 4 CPU’s, and only takes up 70 megs of disk..
   Interviewer: What’s it like on a PC?
   Stroustrup: Now you’re kidding. Haven’t you ever seen Windows ‘95? I think of that as my biggest success. Nearly blew the game before I was ready, though..
   Interviewer: You know, that idea of a Unix++ has really got me thinking. Somewhere out there, there’s a guy going to try it..
   Stroustrup: Not after they read this interview..
   Interviewer: I’m sorry, but I don’t see us being able to publish any of this..
   Stroustrup: But it’s the story of the century. I only want to be remembered by my fellow programmers, for what I’ve done for them. You know how much a C++ guy can get these days?
   Interviewer: Last I heard, a really top guy is worth $70 – $80 an hour..
   Stroustrup: See? And I bet he earns it. Keeping track of all the gotchas I put into C++ is no easy job. And, as I said before, every C++ programmer feels bound by some mystic promise to use every damn element of the language on every project. Actually, that really annoys me sometimes, eve. I almost like the language after all this time..
   Interviewer: You mean you didn’t before?
   Stroustrup: Hated it. It even looks clumsy, don’t you agree? But when the book royalties started to come in… well, you get the picture..
   Interviewer: Just a minute. What about references? You must admit, you improved on ‘C’ pointers..
   Stroustrup: Hmm. I’ve always wondered about that. Originally, I thought I had. Then, one day I was discussing this with a guy who’d written C++ from the beginning. He said he could never remember whether his variables were referenced or dereferenced, so he always used pointers. He said the little asterisk always reminded him..
   Interviewer: Well, at this point, I usually say ‘thank you very much’ but it hardly seems adequate..
   Stroustrup: Promise me you’ll publish this. My conscience is getting the better of me these days..
   Interviewer: I’ll let you know, but I think I know what my editor will say..
   Stroustrup: Who’d believe it anyway? Although, can you send me a copy of that tape?
   Interviewer: I can do that."

86.153.121.222 (talk) 13:34, 28 July 2014 (UTC)

Search up "IEEE The Real Stroustrup Interview", in which it references the above fake interview, as fake. mthinkcpp (talk) 16:47, 28 July 2014 (UTC)
C++ has many glaring problems as a language, and the Wikipedia article seems to ignore the problems. However, the supposed interview posted above is total nonsense, just shows the gullibility of many, their inability to understand satire, their proclivity to clutter a talk page with nonsense. See http://www.stroustrup.com/ieee_interview.pdf for the actual interview. Or see http://www.snopes.com/computer/program/stroustrup.asp for more information. 71.217.116.182 (talk) 05:53, 2 August 2014 (UTC)

Code efficiency? What

I was wondering if the article could go more in-depth regarding the efficiency of C++ generated applications. This seems counter-intuitive to my experience with the language, especially being aware of the machine code being generated from it (as expected of a particularly high-programming language). It seems to me that there is more than a good chance of having code portions that entangle with other code portions, or other intricacies and counter-intuitive behavior. It seems the article makes unsourced claims to the contrary. Not that I am associated with the author of this, but google is rich with contra-evidence: [2] --31.210.186.49 (talk) 14:35, 30 July 2014 (UTC)

Hello there! As with any other programming language article, it's best not to include such evaluations. No performance/efficiency analysis can be made universal as there are just too many things involved – programming environment, benchmarked workload, compiler and its version, used optimizations, etc. And, as always, there's no guarantee that writing assembler code always results in the best possible execution speed. :) — Dsimic (talk | contribs) 05:41, 31 July 2014 (UTC)
Criticism of C++ is not allowed on the C++ Wikipedia page (and god help you if you mention the C++ FQA). Even criticism on this talk page (of which there has been much) will be scrubbed clean in fairly short order, as you can see. Mkcmkc (talk) 21:26, 19 October 2014 (UTC)

Pronunciation clarity in introduction

The article opens with the phrase "C++ (pronounced cee plus plus)..."

There is no established pronunciation for the "word" cee, but there is one for the word see.

Using "cee" could be confusing, especially for non-native speakers of English. The letter C sometimes makes an S sound and sometimes makes a K sound. The letter S only makes an S sound.

Using the letter C to explain how to pronounce the letter C is like defining "epideictic" with the phrase "something that's epideictic." It's self-referential and doesn't clarify anything.

I'm changing it to "see."

--Mr. Billion (talk) 21:05, 14 January 2015 (UTC)

Hello! That cee would be one of the letter names, please see English alphabet § Letter names. Thus, I've reverted your edit, together with explaining it a bit further. Hope you agree. — Dsimic (talk | contribs) 21:58, 14 January 2015 (UTC)
That may be the way to spell out the letter name, but are we explaining how to spell out the letter name, or are we explaining pronunciation? Is the average reader more familiar with the table you linked, or with the word see?--Mr. Billion (talk) 23:17, 14 January 2015 (UTC)
Well, that's the usual way something is written to indicate that it is to be pronounced letter by letter. If we wanted the actual pronounciation, we should be using pronounciation keys such as /ˈs/ in case of letter c. At the same time, plus wouldn't be the approximate pronounciation for "plus" – it would be more like plous or something similar, if not using /plʌs/. — Dsimic (talk | contribs) 01:15, 15 January 2015 (UTC)
Could this addition be some kind of a compromise? Perhaps it's an overkill, but might be useful. — Dsimic (talk | contribs) 04:10, 15 January 2015 (UTC)
This seems OK now. Thanks! --Mr. Billion (talk) 06:07, 15 January 2015 (UTC)
Thanks, I'm glad that you like it. — Dsimic (talk | contribs) 06:09, 15 January 2015 (UTC)

C++14 as new stable standard

Isn't the new C++ standard already stable? I'm a little bit confused, since the C++14 page(and the linked reference: https://isocpp.org/blog/2014/08/we-have-cpp14) already notes, that it's stable, with the official name: "International Standard ISO/IEC 14882:2014(E) Programming Language C++" 213.47.182.54 (talk) 15:47, 4 January 2015 (UTC)

As of Jan 14, 2015, it is a published specification. So I would feel justified in changing it. However, it was published as 14882:2015 rather than 2014. And yet, the ISO abstract calls it 2014. So I'm not sure at present what we should call it. So I don't feel comfortable changing it. Korval (talk) 20:57, 17 January 2015 (UTC)
... And now it says Dec 15, 2014, and it's called 14882:2014. Considering the numbers involved (12-15-14 <-> 1-14-15), I'm guessing that someone at ISO just goofed, then got corrected. Korval (talk) 05:33, 23 January 2015 (UTC)

Criticism

The criticism section of the article is surprisingly short. It's just two sentences (including one that I added!). Compare this to the Java programming language. It has a whole separate wikipedia article for criticism!Michael9422 (talk) 23:32, 20 June 2015 (UTC)

Yeah! And it's really frustrating to not be able to know who was it and why he prevented us from adding content to the criticisms section. The language is so castigated, yet barely any mention of it is given, as if a dictatorial authority had been censoring it. Would that person PLEASE tell us the reason, why he wouldn't let us add content to it! Dannyniu (talk) 06:28, 10 July 2015 (UTC)


The C++ language is damn well castigated, but hardly something is said so here. I guess the reason might probably have something to do with the policy of Wikipedia:

  1. If we were to include all those criticism claims, they have to be **Notably** **Referenced**. However! Since very little programmers and computer scientists are devoted to academics, and as a result little paper was published on the research of the topic, and therefore little references were notable enough to cause the expansion of criticism section here.
  2. Right now, those who are actually concerned with the pitfalls of C++, are actually researchers themselves. And these people cannot get to voice the opinion collaboratively.

Dannyniu (talk) 07:20, 10 July 2015 (UTC)

I'd say that the bigger problem is not so much the lack of "notable" references, but of reliable references. Most discussion of the problems of C++ happen on forums, mailing lists, or similar areas. Maybe you'll find a blog post or two about some C++ issue, but that's about it. People complaining about the language don't really qualify as "news", so most reliable sources don't talk about it.
The closest thing to a reliable source for C++ criticism is the C++ FQA page. And its reliability has very much been questioned. Even people who agree with some of the criticisms on the site feel that there's plenty of nonsense there too. That makes the information less than reliable.
Also, let's look at your example of the Java criticisms article. I don't use Java and have no real knowledge to stand on any side in such a debate. But much of the section on the Java language reads like someone just ran around the Internet and found a couple of blogs that said bad things about the language, then posted them. A blog titled "Stevey's Blog Rants" is not a reliable source by any reasonable definition. Similarly, a site that states: "The reason I posted it nearly seven years ago was not to prove anything, but rather to spark conversation." is not very reliable.
In short, criticism sections attract BS. For whatever good they may do, unless they are well-curated, they will attract lots of garbage.
Furthermore, I don't really see the point of the section. You don't see criticism section on most other languages. Oh sure, Java may have an entire page on criticisms. But JavaScript doesn't even have a section, let alone a page. Python's page doesn't include a section on how some people don't like using whitespace as syntax. You don't see a section on C#'s page about some widely debated inadequacy of that language. It seems to me that a criticism section is hardly essential to a programming language page.
So why don't you answer the reverse question: why does the C++ article need a criticism section? Because you feel that it is "damn well castigated"? Korval (talk) 16:45, 11 July 2015 (UTC)
I think that a criticism section is appropriate because, for example, it is noteworthy that some high profile programmers have criticized it, including Bjarne Stroustrup, who is attributed to have said "Within C++ there is a much smaller and cleaner language struggling to get out". I think that the wikipedia article on string theory has an example of a helpful criticism section. Is it not?Michael9422 (talk) 18:37, 14 July 2015 (UTC)
I am not knowledgeable about string theory, I just mentioned that article as an example of a criticism section with dissenting views from experts in the field.Michael9422 (talk) 00:46, 18 July 2015 (UTC)

Rick Mascitti

Rick mascitti is a link to a redirect to the page C++ (recursive link :)) I would remove the link. — Preceding unsigned comment added by 217.42.221.43 (talk) 14:28, 17 August 2015 (UTC)

That would be fine, please go ahead with unlinking. — Dsimic (talk | contribs) 14:39, 17 August 2015 (UTC)
Unlinked, and also improved the Rick Mascitti redirect. — Dsimic (talk | contribs) 04:46, 18 August 2015 (UTC)

Relation of the language with evolution theory as a model

For learning purpuses much more conveniently to watch to C++ classes/templates/polymorphism/inheritance as to a model (approximation) of the various species of living organisms. RippleSax (talk) 21:44, 22 November 2015 (UTC)

c++ naming irony

The history of the name C++ is given, but no reference is made to the irony of misnaming the language... C++ is a post-increment operator, and when originally referenced (such as in the name of the language) would actually return C - not C + 1. See https://theclassicaltechnopunk.wordpress.com/2014/10/24/why-c-is-a-funny-name-in-an-abstract-intellectual-kind-of-way/ for a more detailed explanation.

Is this worth mentioning inline, as a footnote, or not worth including? 66.249.231.62 (talk) 15:38, 24 March 2016 (UTC)

Edit: Stroustrup himself has commented on this, at http://www.stroustrup.com/bs_faq.html#name with "Connoisseurs of C semantics find C++ inferior to ++C." — Preceding unsigned comment added by 66.249.231.62 (talk) 15:43, 24 March 2016 (UTC)

What jobs can i get with knowledge of c++ only DwayneTino (talk) 03:07, 16 December 2016 (UTC)

More criticism needed

Could we please have more criticism of C++'s many glaring issues. I feel that there's not enough criticism in general, and consider that at least 50% of the page should be devoted to it. Oecology (talk) 09:36, 6 June 2016 (UTC)

That's a recurring topic on this talk page. See for example
and especially
and
For what it's worth, there is a page Criticism of C++ devoted to that topic. – Tea2min (talk) 08:58, 8 June 2016 (UTC)

Most of these criticism, and also those featured are basically POINTLESS. For example one criticism is that C++ is not reflective, but you CAN make your program reflective (with less than 100 lines of code, note) Criticizing the "lack of a library" is also pointless since new C++ libraries come out ALL THE TIME. — Preceding unsigned comment added by 155.69.199.255 (talk) 07:56, 28 September 2016 (UTC)

Criticism section and separate page

In anticipation of possible moves to remove my additions to the Criticism section, I'd like to say that the language complexity issues are in a whole different class than any issues mentioned on Criticism of C++. They are a fundamental design issue, not very technical or specific. Also, they are much more notable, sourced with a very high quality. 213.149.61.212 (talk) 06:12, 10 November 2017 (UTC)

File extension .C

The article currently mentions .C as a file extension for C++ source files in the info box, next to .cc, .cpp, cxx, and .c++. Is .C really (still) used as a file extension for C++ files? – Tea2min (talk) 12:05, 20 March 2018 (UTC)

Yup: https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html 202.167.250.91 (talk) 19:57, 11 July 2018 (UTC)

About the hello world printing in C++

 #include<iostream>
 using namespace std;
 int main()
 {
     cout<<"hello world !";
     return 0;
 } 

Rakesh2916 (talk) 19:37, 24 April 2019 (UTC)

The article already has a hello world example. It's written by Stroustrup himself, and illustrates a number of salient points that yours does not. What more do you want? -- Finlay McWalter··–·Talk 19:46, 24 April 2019 (UTC)

"It is also possible to raise exceptions purposefully, using the throw keyword; these exceptions are handled in the usual way. "

This sentence is garbage. There is no other way to throw exceptions than the throw keyword. Is the author trying to talk about asynchron exceptions, which in case of windows can be caught like (and even converted into) C++ exceptions? This does not need to be mentioned here. — Preceding unsigned comment added by 72.179.4.135 (talk) 00:48, 6 June 2019 (UTC)

"In some cases, exceptions cannot be used due to technical reasons. ...."

Unnecessary complication. C++ without exception handling is not C++ but a completely different language. — Preceding unsigned comment added by 72.179.4.135 (talk) 00:51, 6 June 2019 (UTC)

"Note that many C++ "styles" like Google's,[64] forbid usage of exceptions in C++ programs. "

This stupidity does not need to be mentioned here. — Preceding unsigned comment added by 2605:6000:EC02:E800:1935:C2B5:33C7:D77A (talk) 01:10, 6 June 2019 (UTC)

When copying the page to a draft for an experiment, I ran into this: https://tools.wmflabs.org/copypatrol/en/?id=50508039 — Preceding unsigned comment added by MoonyTheDwarf (talkcontribs) 01:34, 6 October 2019 (UTC)

About the Official C++ Website

ISOCPP.org is not the official website, there isn't a official website. There is only a official documentation, available at https://www.iso.org/standard/68564.html. But no, there is not a official site. Proposing to remove. The creeper2007 (talk) 00:09, 22 March 2020 (UTC)

Oppose. From this About page, the mentioned website is property of the Standard C++ Foundation, whose directors and officers include Chandler Carruth, Bjarne Stroustrup, Herb Sutter and some other notable members of the community. No programming language will own anything, so a website owned by the main not-for-profit organization about that language is probably as good as it gets. BernardoSulzbach (talk) 16:36, 22 March 2020 (UTC)
I don't see any claim that isocpp.org is the official site. What is the problem? Johnuniq (talk) 23:02, 22 March 2020 (UTC)
Well, it says the website is isocpp.org in the side box The creeper2007 (talk)

High-level programming language?

I've noticed this article has the category "high-level programming languages" which seems erroneous to me. The reason why is that C++ provides low-level utilities for manual memory manipulation, and hence calling it high-level seems erroneous to me at least. I wouldn't feel comfortable calling it low-level either, as it does provide significant abstraction, but high-level still seems like an erroneous label for it. I think it's best to omit a category referring to its 'level'. Thoughts? Fuse809 (contribs · email · talk · uploads) 01:42, 7 October 2020 (UTC)

I'd vote to leave it. In the Preface of The C Programming Language, K&R describe C as "not a 'very high level' language". So if C is described as higher than low but not very high level, C++ would have to be described as higher than C. Constructs such as if-else, and while loops are considered indicators of a high level language. If you start adding things like classes, inheritance, exceptions, templates and more it must be high-level. And the slow but inexorable move away from keywords such as auto (as originally used), register and inline also indicate high-level.
"Low-level utilities for memory management" - are you referring to raw pointers, malloc and free or new and delete? It's recommended not to use most of those in Modern C++. peterl (talk)
C++ is a high level language with low level facilities.Carewolf (talk) 08:24, 7 October 2020 (UTC)

"Removed information-free pic" - meet me here

Hi, pic removed as it served no purpose - the C++ was not visible (it could have been python for all I could tell), the lady was no-one of note, the situation was of no significance, so the picture + caption added nothing to the article. So I removed it.

If it has merit, what is it that I'm missing? Thanks 88.108.221.113 (talk) 10:04, 1 April 2020 (UTC)

If you zoom in a bit on the photo, you will see that it is definitely C++ not Python – there are #include statements, an int main(), cout << style output statements, and so forth. The value of the image is that it actually shows someone in the act of coding C++, which, after all, is what the article is about. Wasted Time R (talk) 10:56, 1 April 2020 (UTC)
Hiya, well here's the pic <https://upload.wikimedia.org/wikipedia/commons/4/49/%D0%A1%D0%BE%D0%BA%D0%BE%D0%BB%D0%BE%D0%B2%D0%B0.jpg> I did zoom in on it before, just done so again and I'm stuffed if I can make out the language. Maybe it's just me.
But what does it add. To me the fact that she's female is about the only thing of value because it just might let other women feel it's not so alien a subject to get into (I'm a guy BTW). I guess the other pics have questionable value philosophically, after all who really needs to know what Stroustrup looks like, or the temporary rented chambers for the standards committee, perhaps, but they are both central to the language. What does this pic have to offer? It stood out for me because it seemed so unrelated to anything.
If you feel you want it back, please restore. I'm not going to fight over it. 88.108.221.113 (talk) 18:21, 1 April 2020 (UTC)
It's definitely C++, but "someone actually in the act of coding" doesn't really add much / anything to the article. I couldn't find any other programming language articles that have a similar type of picture. I vote for it to stay removed from this article. Although maybe it would go well in Women in computing. peterl (talk) 21:02, 1 April 2020 (UTC)
Agree with not including the image. No reader of this article will zoom in on a full-screen-sized image to see that it's C++; therefore the image is just someone on a PC with maybe some text of some sort on monitor. Coding in C++ looks exactly like coding in any other language, or just random typing for that matter, so even a much improved version of this image would still be unhelpful. --A D Monroe III(talk) 00:24, 2 April 2020 (UTC)

There’s a photo of what could be a Vegas casino in 1980 (but it’s some committee) and a photo of some event of which, yes, I can read “C++ Quiz”, which makes it totally useful and informative on the subject of C++ and, presumably, quizzes. But the photo that happens to show a woman is removed, with the recommendation that might fit at women in computing.
I guess C++ has earned its reputation (of being responsible for most serious bugs. And also the other one). K. Oblique 12:40, 12 May 2022 (UTC)

poor wording?

I cannot parse this: "Donald Knuth, commenting on pre-standardized C++, who said of Edsger Dijkstra"

Did this mean "said to"? DulcetTone (talk) 22:47, 1 November 2021 (UTC)

He said it about Dijkstra. You can see the original context here. MrOllie (talk) 23:05, 1 November 2021 (UTC)
How odd. I somehow did not understand the sentence as offered, but it is not unclear. DulcetTone (talk) 12:48, 6 December 2021 (UTC)
Welcome to C++. K. Oblique 12:46, 12 May 2022 (UTC)

Move discussion in progress

There is a move discussion in progress on Talk:CXX (disambiguation) which affects this page. Please participate on that page and not in this talk page section. Thank you. —RMCD bot 08:37, 26 May 2022 (UTC)

What is the meaning of C++

What is the meaning of C++ 37.111.137.145 (talk) 00:16, 6 July 2022 (UTC)

It's literally written in the article. Have you tried reading it? Fbergo (talk) 04:06, 6 July 2022 (UTC)

New modern example of C++23

Since July 2022, a bunch of things were added such as standard library modules (P2465R3) and a new formatted output functions (P2093R14). The new "hello world" program uses both fresh core language and standard library features:

import std;

int main()
{
    std::println("Hello, world!");
}

This concise snippet of code conforms to the standard C++23 and thus makes the program well-formed. However, since it's too early, no compilers have supported this as of now. Maybe it's ok to amend the recent changes after the classic hello world code. — Preceding unsigned comment added by Moondezmon (talkcontribs) 11:49, 30 July 2022 (UTC)

I don't think it's appropriate to include this in the main C++ article yet. But you could put it in the C++23 article. --Zundark (talk) 12:09, 30 July 2022 (UTC)