Talk:Comment (computing)
Spammers
Why do spammers continually want to change this page? -- Mattworld 00:53, Nov 16, 2004 (UTC)
- I don't know what their problem is... both the talk page and the article are targets for some reason. Moreso than any other articles I have on my watchlist. -[Unknown] 08:27, Nov 16, 2004 (UTC)
- Most wiki spamming tools assume /wiki/Comment will be some sort of guest book or comment page. --Sam Hocevar 23:56, 24 Nov 2004 (UTC)
NPOV
I added an NPOV-dispute marker to the page because of the authoritatively-stated opinions on how they are to be used. I actually agree with most of those opinions, but I don't think it's appropriate for Wikipedia to give them as its own. Rather, Wikipedia should give information about various opinions on the good use of comments - GNU's coding standards, Linus Torvald's coding instructions, etc. - without taking a side. (I'm kind of amused - I never thought I'd be adding an NPOV-dispute marker to a page on programming-language comments, of all things.) Ruakh 03:59, 8 Mar 2005 (UTC)
Addendum: all of the current non-NPOV text was added at once, in the revision of 24 January 2005. Ruakh 00:02, 14 Mar 2005 (UTC)
- This article has gone through a minor re-write. Maybe we could look again at the NPOV problem and decide whether it still exists and if so, what to do about it. Shinobu 00:41, 6 Apr 2005 (UTC)
I do still think there's a slight NPOV problem, but your rewrite helped it to the point that I think it's okay to remove the NPOV marker now. I'll do so. Thanks for your changes! Ruakh 17:13, 6 Apr 2005 (UTC)
- If I could do anything to make this article any more neutral, I would be most glad to help. Shinobu 20:08, 6 Apr 2005 (UTC)
XML comment syntax
I think there is way too much examples for XML and consorts. The various examples with added minusses are about as relevant as added C examples containing various numbers of stars would be. Also they clutter up the list.
Moreover, due to the structure of the rest of the list it might seem to an unsuspecting viewer that the examples actually denote different syntax, instead of variations on one syntax. I'll be removing the spurious examples. Shinobu 22:58, 5 Apr 2005 (UTC)
- I disagree with this statement: "The various examples with added minusses are about as relevant as added C examples containing various numbers of stars would be." Note that in SGML, <!-- comment -- code -- comment --> contains both comments and code. (See the HTML 4.01 Strict Document Type Definition for examples of this.) Therefore, while perhaps not so many examples are needed, I think you're out of line to remove all the examples and explanation.
- Also note that while XML is a subset of SGML, it does not fully support SGML comments: all valid XML comments are valid SGML comments, but the reverse is not true.
- I've therefore reverted the parts of your change that relate to XML vs. SGML. Ruakh 17:10, 6 Apr 2005 (UTC)
Thanks! I should have read the docs more thoroughly. The part about the --
's I just did not notice. I have updated the layout for better readability. I hope the *:-trick works for everyone. You're always welcome to drop me line! Shinobu 20:11, 6 Apr 2005 (UTC)
List sorting
It seemed evident to me that originally the lists were supposed to be sorted on alphabet. I have re-sorted the lists, but a question has popped up in the process. What is our stance on those items that are examples for more than one language? Shinobu 15:20, 10 Apr 2005 (UTC)
- I don't know if we really need a stance. I don't think the current or no order appears to be confusing to readers. -- Taku 00:46, Apr 11, 2005 (UTC)
- I'd say, go in alphabetical order by the first language listed in the example's label. Now the question becomes, which language should get listed first in an example's label? I'd say that the most important language should be listed first (which is inherently NPOV, I suppose, but I think there'd only be disagreement in very rare cases), unless the phrasing requires something different. For example, HTML is more important than SGML, but since HTML is an application of SGML, the "SGML, including HTML" phrasing makes more sense. Ruakh 15:45, 11 Apr 2005 (UTC)
In that case we can probably leave it as it is now. Shinobu 16:01, 11 Apr 2005 (UTC)
Example in usage
As for the example I added in the usage section, I thought that if someone see
list = [b, b, c, d, a];
he may think that a, b, c and d are not variables. So I changed it to
list = [f (b), f (b), f (c), f (d), f (a)];
Here, I think f looks like a function. If any of you can come up with the better one, that would be appreciated. -- Taku 00:46, Apr 11, 2005 (UTC) I think most people would think they are variables. (Most languages quote strings.) However, it does not matter for this example wether a ... d are variables or not. If taken as strings, the reader just sees the special case a = "a" etc. Since you used arbitrary variables this does not matter. The example would have served equally well if the list would have been [a, a, d, a, b] or something entirely different. So reading the variables as strings is just taking an arbitrary example, which is what you intended in any case. Introducing an extra function is not necessary.
So what to do? 1) Leave it as it is. 2) Revert it. 3) Use strings. 4) Leave out the "list="-line. (And maybe rename list to something fancyful.) 5) Retrieve the list via a function call. list = files_in(my_folder);
I hope this helps. I'm personally in favour of 4 or 5, but I encourage you to use your own imagination, since there must exist examples I overlooked. Cordially yours, Shinobu 01:26, 11 Apr 2005 (UTC)
Whitespace?
The remark about comments being regarded as whitespace is not necessarily true. In HTML for instance, HT<!-- comment -->ML
results in "HTML", not in "HT ML". Also I seem to remember some old C compilers allowed one to glue identifiers together using /**/
, which was useful because ##
was not supported back then. Shinobu 02:06, 12 Apr 2005 (UTC)
- Yeah, I think that's simply an error. There are plenty of languages where comments are less significant than arbitrary whitespace. I'm reverting that change. Ruakh 05:30, 12 Apr 2005 (UTC)
Usage
- Automatic documentation generation
- Other uses
Shouldn't these be in the Usage section? The flow of the article feels a bit illogical as it is now. Shinobu 05:09, 18 May 2005 (UTC)
Does the "summary" section have to be so long?
I really don't think it's necessary to mention every technique that any language has ever used to indicate comments. I think it would suffice to state that nearly every human-writable computer language has had some mechanism for including comments, and then give a few characteristic examples of some different types (say /* */
and //
, as they're popular multiline and one-line methods that a lot of programming languages use, plus <!-- -->
because it's of special interest to Wikipedians, and possibly BF-style because it's quirky and can convey the point that not all languages necessarily use even the same sort of approach to indicating comments).
I'm bringing this here, rather than just editing the article myself, because so many people have added to the list that, according to the generalized pigeonhole principle, at least one of the following is true:
- a lot of people think it is useful.
- a lot of people have contributed without considering whether it is useful.
- a lot of people have contributed even though they think it's not useful.
And in case #1 of these is true, I want to hear why. :-)
Ruakh 00:48, 29 December 2005 (UTC)
- As a programmer I just enjoyed looking through the different approaches to comments there are. Maybe one day, knowing that all comment syntax is documented here, I might be able to come here for a quick referece if I am using a language I never used before. For example: I have to maintain some old code written in an obscure dialect of BASIC and nobody ever commented anything. Anyway, does it matter whether the page has too much information. Readers can use the TOC link box at the top of the page to skip over all the examples.JesseHogan 02:39, 29 December 2005 (UTC)
- Firstly, if you want information on how to create a comment in a specific language, then wouldn't it make more sense to look at the article on that language, rather than at the article on comments in general?
- Secondly, I'm a bit concerned by your choice of example: "an obscure dialect of BASIC" (emphasis mine). Does this mean that every language that's ever existed should receive a note on how it denotes comments?
- Finally, I think your first sentence - "I just enjoyed looking through the different approaches to comments there are" - is actually an argument in favor of trimming. Currently, with each different symbol receiving its own list item (some symbols receiving multiple list items -
/* */
is listed five times, for example), it's more difficult to get an overall view of the different approaches. There aren't that many different approaches, and if you want to find the less-common ones, you have to slog through a long list of almost-identical ones.
- Finally, I think your first sentence - "I just enjoyed looking through the different approaches to comments there are" - is actually an argument in favor of trimming. Currently, with each different symbol receiving its own list item (some symbols receiving multiple list items -
- You make good points but I think our disagreement is that it doesn't bother me that the article is big but it does bother you. I'm not going to be upset if you delete all the examples so go ahead and delete them of its that important to you. JesseHogan 07:16, 31 December 2005 (UTC)
- I kind of like the list... it gives you a kind of comparison that the individual pages on the languages themselves can't give. If it really bothers you to have it here, maybe you could move it to a new page instead of deleting it outright? Shinobu 01:27, 3 January 2006 (UTC)
- You make good points but I think our disagreement is that it doesn't bother me that the article is big but it does bother you. I'm not going to be upset if you delete all the examples so go ahead and delete them of its that important to you. JesseHogan 07:16, 31 December 2005 (UTC)
- I find the list useful as a reference, because it denotes the exact syntax of comments for several languages; it's also interesting. Wikipedia is not paper, and I see no need to shorten it or move it to another page, though the latter is certainly the better option. I'll also, because I believe in full disclosure, point out that I started the list in August 2003, and have enjoyed seeing people contribute to it and greatly improve it. See [1]. -- Mattworld 02:53, 3 January 2006 (UTC)
if (FALSE) { ... } =
I deleted this from the R entry. While if can be used in this way to prevent a block of code from executing, and R's syntax makes it , this is really a feature of block-structured languages as opposed to a "comment" tool. You might as well say that the C preprocessor trick #if 0 ... #endif
is also a way to do comments. -- 168.140.181.4 00:22, 9 October 2006 (UTC)