Talk:C++/Archive 2

message: Wikipedia is not a repository of links.  This article is extraordinarily long and full of links, of which some are certainly not appropriate (it has crossed the Spam Event Horizon).  Please pare down the links to only what is appropriate for an encyclopedia.  --bmills 14:45, 16 February 2006 (UTC)
replies: text: I like your progress so far with the cleanup; you're definitely moving things in the right direction.  As for the "mapping" link, have a look at this diff.  That particular link was added as part of a pair from an anonymous DirecPC IP; checking other contribs from that IP reveals similar links at Session Initiation Protocol.  I'd say that means it's linkspam, and thus safe to remove; if a comparison with implementation in another language is needed, we can always add actual content from a source that isn't out to make a profit.  --bmills 18:34, 20 February 2006 (UTC)

text: Cleaned a few references, it just looks like a huge list of books. --vineeth 07:24, 27 February 2006 (UTC)
thread_title:  Cleanup 

message: I removed 5 links and 7 see alsos as a part of the cleanup, and have now at least scanned the content of each remaining link and seen that it is reputable and worthwhile.  With that in mind, my question is should the cleanup tags be removed?  In my opinion, the one on the see also section should, and maybe link one too.  I'm new to wikipedia editing so I don't know how that really works yets.
MadCow257 23:58, 24 February 2006 (UTC)
replies: text: I've removed the cleanup tag from the "see also" section — it looks good!  Still a lot of external links, but good progress is being made.  I added a cleanup tag to the references, too, because it seems like some of those books are just C++ tutorials added for commercial and/or fanatical purposes, and you guys are doing such great work getting rid of cruft in the other sections!  --bmills 02:46, 25 February 2006 (UTC)
thread_title:  Tags 

message: Per the peer edit and the preferable article size policy, something needs to be moved out.  I propose that a new article bad made called Syntax of C%2B%2B. This would significantly reduce the size and technicality of this article, while giving more space for the rest of it too expand if needed. Thoughts? MadCow257 03:31, 5 March 2006 (UTC)
replies: text: The article has a lot of excess content; the "references" and "external links" sections could still use some trimming.  Most of the "sample code" examples are also significantly longer they really need to be; the "polymorphism" section is very confusing (the basic idea gets across, but the details are muddled), so it might be good to clean that up and trim it down.  Just some ideas for keeping the article size under conrol.  —donhalcon╤ 05:04, 5 March 2006 (UTC)
replies: text: MadCow257, I don't think moving the whole Syntax section out would be the right thing to do, because the Syntax section isn't really a section on Syntax at all; as it is now, every single section inside Syntax is not about syntax. Instead, I propose that "Sample Code" be moved into C++ examples (with a link to C++ examples remaining as the only thing in the "Sample Code" section) and that the "Syntax" header be deleted entirely until there is some section of the article that's really about C++ syntax, rather than sections that are about features of C++ which happen to show examples of syntax. --Tifego 02:28, 11 March 2006 (UTC)
replies: text: I went ahead and reorganized the article a little bit, but I didn't move anything out yet so it's still too big. The sample code should probably be moved or drastically shortened. And the section on Polymorphism really needs work. It has a big chunk of example code that is confusing and could be replaced with a couple of sentences, it tries to cover too many topics at once, has no clear focus, etc. Also, it only mentions templates sort-of in the passing, but they are a very important part of polymorphism in C++ and at least deserve their own subsection to emphasize that. --Tifego 03:34, 11 March 2006 (UTC)

text: I would suggest the name C++ syntax for the child article, along the same lines as C syntax and Java syntax. – Doug Bell talk•contrib 12:13, 12 March 2006 (UTC)
thread_title: A move and/or cleanup

message: I (mildly) oppose the recent move of the article from C++ to C++ programming language. From Wikipedia:Naming conventions (languages): 
:Languages which share their names with some other thing should be suffixed with "language" in the case of natural languages or "programming language" in the case of programming languages. If the language's name is unique, there is no need for any suffix.
However, the convention also states (using VBScript as an example of a language name where no disambiguation is needed):
:Similarly, please place a redirect to VBScript at VBScript programming language and also at VBScript (programming language).
It is no big deal either way, and I won't revert the move. —Tobias Bergemann 10:16, 12 March 2006 (UTC)
replies: text: I agree - see Fortran, PHP, and Smalltalk for other examples of languages that don't end in "programming language". The move's only justification was that it was for consistency, but it's not consistent by those naming conventions. --Tifego 11:20, 12 March 2006 (UTC)

text: If the scope of this encyclopedia were limited to computer programming related things, I would say the title "C++" is better than "C++ programming language". But it isn't. So, despite me finding the latter a bit clumsy, I think the longer title is true and correct. I took a look at the current ISO Standard. Its name is "Programming languages — C++" (ISO/IEC 14882, second edition 2003-10-15). The first sentence in the intro of the standard reads "This International Standard specifies requirements for implementations of the C++ programming language." I think the situation as it is now is perfect (article name = "C++ programming language" and a redirect to that under the name "C++). --Adrian Buehlmann 18:48, 12 March 2006 (UTC)
thread_title:  The move from "C++" to "C++ programming language" 

message: I think this article is waaaaay too big for Wikipedia. All those "syntax", "operator" etc. stuff can be done away with. Section 7 -- the whole thing -- is IMO not Wikipedaic. We should link to tutorials, not write one ourselves. People come here to <learn about> C++, not to <learn> C++. If everyone agrees, someone should step up and do some *major* cleanup.
I removed the STL code examples; I don't really think we need them. Loads of programmers I know don't even use the STL.
Jafet.vixle 03:44, 13 March 2006 (UTC)
replies: text: Looks like a step in the right direction. Everything after and including the "Incompatibility with C" section in this article is still way too long, though (as you said). I believe everything that's in the "Language features" section (and a few things that aren't) deserve an entry there for being very relevant to C++, but each subsection should either be much shorter, or consist of a link to another article that covers the topic in more detail. "Sample code" has a lot of description in it, someone should decide how much of that is really notable information. The section on Input/output streams in particular looks like a waste of space considering that io streams were already used in an example above that. --Tifego 03:59, 13 March 2006 (UTC)

text: I moved discussions older than about january 2006 to Talk:C++ programming language/Archive 1. —Tobias Bergemann 13:46, 13 March 2006 (UTC)
thread_title:  Needs cleanup 

message: :The following discussion is an archived debate of the proposed move of the article from C++ programming language to C++. No further edits should be made to this section.  
The result of the debate was speedy move by Deryck C. --Tifego 04:15, 19 March 2006 (UTC)
replies: text: I agree with you Deryck, except for one thing. "C" is very commmonly used with "programming langauge", even among experienced coders. I've never heard anyone call C++ "C++ programming langauge" in my life. Point is C is not only called c programming because of ambiguity, but because that's its name. The same does not apply to C++ and it should remain C++. Not really a big issue though with the cheapness of redirects... MadCow257 23:30, 15 March 2006 (UTC)
replies: text: Just curious, but did you look at the previous discussion above regard "ever hearing it called "C++ programming langauge"? – Doug Bell talk•contrib 01:07, 16 March 2006 (UTC)
replies: text: Yes, I have, and there is more opposition then support there. I do realize that Wikipedia is not a democracy though. These kind of issues are small and numerous, the best policy would just be to leave them alone (why not make the major issues better first), so it was pretty disappointing when I saw it get moved to c++ programming language. As for Bjarne's book, let me make an analogy. C++ Programming Langauge :: Direct3D Graphics Programming.  You would most likely not have a book called C++, nor a book called Direct3D. The longer version is not the name of the langauge, but the name + a description MadCow257 03:10, 16 March 2006 (UTC)

text: And you never call this place "Wikipedia the free encyclopedia". If no more oppositions I think undoing the move is what I'd do. --Deryck C. 04:25, 16 March 2006 (UTC)
thread_title:  Move back to [[C++]]? 

message: It's written in this article that "some considers using namespace as bad programming practice", and placed down an "citation needed". I wonder is it so much of a bad practice that there can be sources citing it? --Deryck C. 02:07, 19 March 2006 (UTC)
replies: text: I noticed that edit, and it's not really acurate. Maybe it should be reverted? MadCow257 02:09, 19 March 2006 (UTC)
replies: text: "Some", IMO should really be true. You can't argue that nobody thinks it's bad. But citation is not needed. --Deryck C. 02:17, 19 March 2006 (UTC)

text: I recall reading it in either Stroustrup's CPPPL, or one of the Meyer or Bruce Eckel books. The idea is that std is such a large namespace that importing it wholesale could be a bad idea. Personally I don't think it's such a bad idea, but what I do is use using namespace std while sketching code and then change it to several using std::cout (etc) statements as it solidifies. Jon 03:07, 19 March 2006 (UTC)
replies: text: The argument against using an entire namespace is that it essentially circumvents namespacing. However, that can also be an argument for it (i.e. namespaces are annoying and deserve to be circumvented). --Tifego 03:11, 19 March 2006 (UTC)

text: In my programming practice, I use some 20 std:: functions. If each of them has to be implemented with the "using" keyword, the code would be drastically big. --Deryck C. 07:26, 20 March 2006 (UTC)
replies: text: It's just 20 lines of code, how is that drastically big? –Tifego(t) 00:46, 20 March 2006 (UTC)

text: The entire code is only 100 lines long. --Deryck C. 07:47, 20 March 2006 (UTC)
replies: text: Oh, I'm more used to dealing with 10000+ lines. It still doesn't matter though, it's not like "using" can possibly makes your code less efficient. If you had said "it would be drastically inconvenient" instead of "the code would be drastically big" I'd only have agreed. –Tifego(t) 00:46, 20 March 2006 (UTC)

text: I usually program for competitions, and the longest program is <1000 lines long. --Deryck C. 08:14, 20 March 2006 (UTC)
replies: text: Anyway, this is getting way off-topic. I can't find any good references for "using namespaces is bad", only mentions of older programming books saying it's bad, and I don't have any such older programming books to check. Google searches that find anything relevant mostly come up with people saying it's bad (in some forums), but that's no reference. –Tifego(t) 00:46, 20 March 2006 (UTC)

text: What a pity that nobody publishes them from the forum to the site. --Deryck C. 08:54, 20 March 2006 (UTC)

text: My CS311 teacher says to avoid it ("namespace pollution"?). An article here says it's not necessarilly bad but should be avoided --DevastatorIIC 10:01, 20 March 2006 (UTC)
thread_title:  "using namespace" is bad? 

message: I took it off peer review because it'd accumulated enough things and was near the bottom. Hopefully someone else can clean up polymorphism because I don't have any experience with it :( Maybe we could strike through the bullets in the review as they're done, what's the wiki code for strikethrough? MadCow257 23:37, 27 March 2006 (UTC)
replies: text: don't know about wikicode, but you can use the html del tag.--MarSch 13:24, 29 March 2006 (UTC)
replies: text: the code is < s > < /s >, and I've striken through what's been done MadCow257 22:55, 29 March 2006 (UTC)
thread_title:  Peer Review 

message: I made an attempt at cleaning up the polymorphism section. I think it still needs some work (so, somebody please look over it), but at least it's not so incredibly long anymore. –Tifego(t) 00:46, 20 March 2006 (UTC)
thread_title:  [[C++#Polymorphism|Polymorphism]] 

message: The sample code section has a cleanup tag. Can anyone say more specifically what about it needs to be cleaned up? Also someone put an Article with off topic sections tag, what's that about MadCow257 02:43, 31 March 2006 (UTC)
replies: text: You answered your own question, almost. The cleanup tag does say specifically that the reason it needs to be cleaned up is because it's off-topic. The examples were too numerous and there's already a page for C++ examples, at least at the time that tag was added. Basically the article as a whole was too long and that section got tagged as a candidate for shortening. Looking at it now, what I think is wrong is that there's overlap (in terms of what information they teach) between "minimal program" and "hello world", and overlap between "hello world" and "input/output", and all three sections contain not-very-important-to-C++ stuff in them (for instance, EXIT_FAILURE and what file it's defined in). –Tifego(t) 00:46, 20 March 2006 (UTC)
replies: text: I trimmed it down and removed the tag. –Tifego(t) 00:46, 20 March 2006 (UTC)
thread_title:  More tagging 

message: This article could benefit from a section on criticisms, but I think the one that was added needs a bit too much work to be in the article in its current state. It comes across as very one-sided, for one thing. If there is a section on criticisms, there should probably be an accompanying section on praises. Also, it begins with It is commonly said that "It's easier to shoot yourself in the foot with C, but when you do it with C++ you blow your whole leg off". But this quote is incorrect, not attributed, taken out of context, and not very encyclopedic to introduce a section with such a statement. Each of the criticisms should be properly attributed to somebody or given a link to a reference that expresses that view, and not stated as if the negative points were all actualities. The "implementations" section was most fleshed out, but also completely uncited. (I realize I also added some stuff here that was uncited, but that was factual information about the language, not a subjective issue of criticism, and was strictly as a rewrite of other already-uncited material, not a new addition of it.) –Tifego(t) 00:46, 20 March 2006 (UTC)
replies: text: I understand that the section needed possibly too much work to be worth including at the moment, but some of the others reasons aren't important. The quote came from http://public.research.att.com/~bs/bs_faq.html#really-say-that, and C started out with a section of it as well. Its crisicm, so as long as all of the things are really said, then it can be as POV as it needs. I did a citation too, in the resource section. I guess you've insipired me to right up a better version in Word though. Besides philosophy, this is like the most important section and C++ doesn't even have one which is why I put it up in haste MadCow257 15:41, 1 April 2006 (UTC)
replies: text: That link you gave says the quote slightly differently than the one you added, but more importantly, it also says that it was not a criticism of C++ in particular, and that it is taking it out of context to state it as such, so while it is relevant to the criticism of C I am not sure it is relevant to the criticism of C++. As for it being POV, the problem was mostly just a matter of wording—it sounded like it was stating things such as "it's too hard to learn" as fact, when you really meant they were the opinions of some person or group of people. And for citations, the external link should also appear right there in the article after the claim. 
–Tifego(t)01:22, 2 April 2006 (UTC)

text: By all means; that criticism section looks well-done. But the previous C++ criticism section was nowhere near as good or neutral-sounding as that. –Tifego(t) 19:24, 10 April 2006 (UTC)
replies: text: And there should be more material in the section before that's really possible. The list of criticisms that was up there before (the second one) was entirely meaningless, or at best poorly-articulated. The criticism for Java generally states and explains specific facts (Java failed to deliver such and such feature, Java is slower at this because of so and so) whereas the C++ criticisms before said vague things like "multiple inheritance can be avoided" or "code is longer then it needs to be". The latter of those is far too general and the former does not even qualify as criticism at all. (The other two criticism points were about linkers and appeared to be have no basis in fact.) –Tifego(t) 19:36, 10 April 2006 (UTC)
thread_title:  Critisms section 

message: The article has a redlink to a C+ programming language. Does anybody know what this should really be? My best guess is that it means ABCL/c+, but I'm not all that sure about it. –Tifego(t) 05:12, 8 April 2006 (UTC)
thread_title:  C+ redlink 

message: Why they are removed ? —The preceding unsigned comment was added by Alhoori (talk • contribs) .
:There are at least 5 links to tutorials in the external links here. Is that what you were looking for? –Tifego(t) 06:00, 19 April 2006 (UTC)
replies: text: I deleted two links before, and deleted them again. I'm sorry, but these tutorials are not of high quality, and in particular are almost entirely C rather than C++ (why does the 'strings' section talk about arrays of chars instead of std::strings for example). Only a very small number of tutorials can be linked to from wikipedia. Sorry. Mrjeff 09:37, 19 April 2006 (UTC)
replies: text: std::strings are nice, but there's nothing inherently non-C++ about char* either (and IMO they're important for C++ programmers to at least know about since they will probably have to deal with them sometime). However, the first of those two links is to an entirely-C tutorial that said so, which makes it basically linkspam here, and the second one isn't very high-quality and says little about C++. –Tifego(t) 16:42, 19 April 2006 (UTC)
thread_title:  Easy tutorials 

message: Does anyone know of a C++ compiler that uses a binary file format? I've been given a file, supposedly a C++ with QT app, that I'm supposed to compile, but it's binary and has the extension .m4 (which I would have thought would refer to the m4 macro processor, but I've been told not). Anyone know about it? — mæstro t/c, 10:55, 11 May 2006 (UTC)
replies: text: Did you check here for what .m4 might mean? –Tifego(t) 16:58, 18 May 2006 (UTC)
thread_title:  (OT) Compilers question 

message: I added a link to wikibooks:programming:c++. I think that links like this will result in improvement in wiki-books, and will result in usable reference manuals, unlike what wikibooks are now (i.e. incomplete). 24.210.73.62 22:41, 14 May 2006 (UTC)
thread_title:  Wikibook 

message: Why someone removed the useful tutorial link http://www.alnaja7.org/Programmer/102/itcs_102.htm ? can he/she give use better links ? Many suffered until find the right information in the right time , but some people don't like this ! Alhoori 01:22, 21 May 2006 (UTC)
replies: text: This has already been discussed in your talk page. OhNoitsJamieTalk 03:12, 21 May 2006 (UTC)
replies: text:  I asked the members to decide that , and your reasons what not reasonable ! Alhoori 09:16, 21 May 2006 (UTC)
replies: text:  I previously commented on this. It is my belief that these articles do not sufficently cover good C++ practice. As a general rule, I think you should try to only insert links to sites you have no personal connection with. I have tried to do this, as it avoids the quite strong and reasonable urge to link to things which I have written wherever possible. Mrjeff 17:23, 21 May 2006 (UTC)
thread_title:  Remove Tutorials links 

message: Free book "C++: A Dialog" is "not recommended" by accu.org review . Based on this I removed it from the list. Pavel Vozenilek 04:55, 27 May 2006 (UTC)
thread_title:  Steve Heller's book 

message: These sections need radical overhaul:
* references should not start with Abrahams' book - this one describes the most esoteric aspects of C++. Having surname starting with "A" is not a privilege be always the first.
* Current trend in C++ books for novices is to start with useful C++ tool and only much later reveal the old C roots. Such books are now missing or hidden (Lippman, Koenig, Glassborow's "you can do it"). The "The C++ Annotations" online book expects prior C knowledge. Even if free it should not be recomended, unless explicitly labeled as transition from C.
* Two of books present are quite negatively reviewed in accu.org: Oualline's review, Malik's review. Pavel Vozenilek 05:15, 27 May 2006 (UTC)
replies: text: Good catch, I've removed both Oualline books and the Malik book. Even if they didn't have bad reviews, there is nothing to recommend them as especially important books about C++. --MarSch 10:33, 29 May 2006 (UTC)
thread_title:  Books and references sections 

message: While reading the section of the article labeled "Minimal Program" i came to a realization. The program that is listed is fundamentally flawed. The main() function is described of being of the type 'int'. this means that the function must by default return a value to the processor that is compatable with the type 'int'. The program displayed, however, does not meet this prerequisite. if you input this program into any compiler, it would instantly give you an error message, something along the lines of "function int main() must return type int." to rectify this situation, i would suggest adding the line 
  return 0;
to the area in between the
{
}
Ex.
{
  return 0;
}
Nimnengil 00:31, 31 May 2006 (UTC)
replies: text: VC6 returns "void" by default (at least that is what it is telling me with its warning), so evidently it is one of those newer things in the standard (well, if you consider "newer" in the last 8 years, heh!). This is besides the point though, because it seems like a totally pointless example - if I came across a program like that (because in real life you probably would want to comment that thing, and of course after commenting it you've defeating the whole purpose of not returning anything) it would terrify me (erm, just being pedantic - heh!) - but hey, people must like it I guess :). RN 08:23, 31 May 2006 (UTC)
replies: text: As far as I know, the implicit return for the main function was indeed introduced with the 1998 C++ standard and is not part even of the latest C standard. However, the int return type has always been (again as far as I know) the only standard conforming return type for main, both in C++ and in C. Quoting ISO/IEC 14882:2003 3.6.1/2: "An implementation shall not predefine the main function. This function shall not be overloaded. It shall have a return type of type int, but otherwise its type is implementation-defined. [...]" — Tobias Bergemann 09:15, 31 May 2006 (UTC)
thread_title:  "Minimal program" error 

message: I just removed the following two links. I don't think there is any need for links to >$2,000/day training courses. If anyone wants to argue the case, feel free to do so.
http://objectdiscovery.com/C++.php 5 day C++ training
http://www.bdsoft.com/ C++ training geared towards programmers
Mrjeff 16:57, 7 June 2006 (UTC)
thread_title:  Training Providers 

message: Hi all -- You might want to be aware of a situation with an anonymous user who is inserting external links to his site at vias.org into various articles. He seems to take online, copylefted books, and mirror them on his own site, with ads. There's nothing illegal about what he's doing, provided he complies with the terms of the license, but I think it's more appropriate to link to the version of the book on the author's own site. This happened in this article with Downey's book, and I've changed the link so it points to the copy maintained by Downey himself.--Fashionslide 21:17, 15 June 2006 (UTC)
thread_title:  external links 

message: Ok, please correct me if I'm wrong (no C++ pro), but check the following code:
__
   #include <iostream>
   using namespace sdt;
   int main()
   {
   cout << "Hello World!" << endl;
   system("pause");
   return 0;
   }
___
This is how I should write it. You need the pasue, or the "Hello world" would just flash by.
But why write it like it's done in the article? Looks more complicated... Cybesystem 23:49, 9 July 2006 (UTC)
replies: text: It's true that if you run the program, without it being in a terminal, the "hello world" will just flash by. However system("pause") won't work on lots of computers, and definatly isn't standard C++, as it assumes you have a program installed called pause. I often write C++ on computers that don't have a pause command :) The whole "Should you include ostream" problem is a big one. There are a few compilers where you have to include ostream, but the ones most people use (in particular g++ and Microsoft C++) don't require it, as they put ostream in iostream. It doesn't hurt to put the header there however. The toss-up between "using namespace std" and "std::cout", "std::endl" is the kind of thing that wars are made from, and I don't think either in this example is that much better than the other, so I would just leave it as it is :) Mrjeff 11:18, 10 July 2006 (UTC)
replies: text: More specifically, the system() function only works on Windows computers, by sending the command within system("") to the console (ie. DOS). There is, however, another way around this: using std::cin.ignore(). This has its drawbacks though, if you use std::cin >> variable before using std::cin.ignore, the program will just pass the ignore statement by. --65.92.105.13 22:48, 26 July 2006 (UTC)
replies: text: No, system() itself works fine e.g. on UNIX (where it originated). But pause is not a UNIX command (and not part of C++), and the standard basically allows system() to do whatever it wants with its argument (the behaviour is implementation-defined) --Stephan Schulz 09:03, 28 August 2006 (UTC)
thread_title:  Example code 

message: Templates are currently only discussed under the polymorphism header --I added a short sentence and a reference to the template metaprogramming article-- but since they are a large, complicated, sophisticate and for some even controversial feature, should be discussed in its own section. Mikademus 07:30, 25 July 2006 (UTC)
thread_title:  Language features section 

message: I really don't like this title - it seems like a way to shove off criticisms of the language. AT THE VERY LEAST export is absolutely not an "old problem" - it says it right in the article that it is not. Basically none of the major compilers implement it yet, it has been in the standard for something like SEVEN YEARS, and a lot of the current books refer to it. Plus there has been an insane amount of controversy over it, including that one rather infamous paper by Herb Sutter from Microsoft and someone else. RN 01:51, 26 August 2006 (UTC)
replies: text: Actually a few major compilers do support it now, but I agree it's still a mess and also a number of other compilers (g++ in particular) seem to have little interest in trying to implement it, and there is a good chance it will be scrapped and replaced with something else in C++0x I believe. Mrjeff 19:50, 26 August 2006 (UTC)
thread_title:  "Old problems"