digitalmars.D - Comments in C, C++, C# and D major
- wolfgangamadeus <wolfgangamadeus_member pathlink.com> Jun 04 2004
- Charlie <Charlie_member pathlink.com> Jun 04 2004
- "Marc" <iam here.net> Jun 04 2004
- Ant <duitoolkit yahoo.ca> Jun 05 2004
- Dick Zantow <rzantow ntelos.net> Jun 06 2004
- Stewart Gordon <smjg_1998 yahoo.com> Jun 07 2004
I dislike the c style comments. I know for compatability reasons that this might be impossible but shell script pound comments are better. I prefer the pound comment to that hideous // /* */ trogolith from C. I can't understand what Kernighan and Ritchie chose them for C because C style comments in short, they are a disaster. Even Perl uses pound comments. You should be able to use a single character to denote a comment like the pound sign in the Bourne Shell. I think the pound sign is a vast improvement. Instead of some C comment for: /* This comment really sucks because it is to verbose to comment */ // or even this is stupid because you have to enter two keys to comment your // line. plus the double dash is a really ugly kretin from hell // which I have no idea // why it was chosen. You can use a pound shell comment (as in Perl and Shell scripts) for: #< This is a possible multiline comment #> # This is so much better. Shell scripts are for speed and simplicity # C style comments suck in comparison and who wants to type twice to comment # one lousy line. # I think the pound comment is much better although it might be to politically infeasible to swallow.
Jun 04 2004
As much as I despise perl, I have to agree. # currently has no meaning in D, though we already have three comment markers, I would welcome this addition, though I dont have much hope that it will be adopted. Choose your battles :/.I prefer the pound comment to that hideous // /* */ trogolith from C.
Trogolith ? Fun word! But i couldnt find a defintion ? C In article <c9rja9$31d4$1 digitaldaemon.com>, wolfgangamadeus says...I dislike the c style comments. I know for compatability reasons that this might be impossible but shell script pound comments are better. I prefer the pound comment to that hideous // /* */ trogolith from C. I can't understand what Kernighan and Ritchie chose them for C because C style comments in short, they are a disaster. Even Perl uses pound comments. You should be able to use a single character to denote a comment like the pound sign in the Bourne Shell. I think the pound sign is a vast improvement. Instead of some C comment for: /* This comment really sucks because it is to verbose to comment */ // or even this is stupid because you have to enter two keys to comment your // line. plus the double dash is a really ugly kretin from hell // which I have no idea // why it was chosen. You can use a pound shell comment (as in Perl and Shell scripts) for: #< This is a possible multiline comment #> # This is so much better. Shell scripts are for speed and simplicity # C style comments suck in comparison and who wants to type twice to comment # one lousy line. # I think the pound comment is much better although it might be to politically infeasible to swallow.
Jun 04 2004
I prefer the pound comment to that hideous // /* */ trogolith from C.
Searching Trogolith gaved nothing. Trying with Trogolite brings a page with some synonyms. One of them was 'Trogolyte" Then , from this page: http://dictionary.reference.com/search?q=troglodyte "troglodyte" <jargon> (Commodore) 1. A hacker who never leaves his cubicle. The term "Gnoll" (from Dungeons & Dragons) is also reported. 2. A curmudgeon attached to an obsolescent computing environment. The combination "ITS troglodyte" was flung around some during the Usenet and e-mail wringle-wrangle attending the 2.x.x revision of the Jargon File; at least one of the people it was intended to describe adopted it with pride. May be...
Jun 04 2004
On Sat, 05 Jun 2004 04:48:09 +0000, wolfgangamadeus wrote:I dislike the c style comments.
You are very lucky if this the worst think you can find in D :) Ant
Jun 05 2004
wolfgangamadeus <wolfgangamadeus_member pathlink.com> wrote in news:c9rja9$31d4$1 digitaldaemon.com:I dislike the c style comments. I know for compatability reasons that this might be impossible but shell script pound comments are better. I prefer the pound comment to that hideous // /* */ trogolith from C. I can't understand what Kernighan and Ritchie chose them for C because C style comments in short, they are a disaster. Even Perl uses pound comments.
value = somefunc( p1 /* required */, p2 /* may be null*/ ); How do you intersperse comments using a '#'? Not that I ever comment anything, but still ....
Jun 06 2004
wolfgangamadeus wrote: <snip>You should be able to use a single character to denote a comment like the pound sign in the Bourne Shell. I think the pound sign is a vast improvement.
But in a C-like language, someone's going to see a # and think "preprocessor directive", even if they don't* exist in D. Actually, one has been kept, namely #line./* This comment really sucks because it is to verbose to comment */
I think you mean "too verbose to" not "to verbose to". AIH, the D compiler isn't as forgiving as many humans are....// or even this is stupid because you have to enter two keys to comment your // line. plus the double dash is a really ugly kretin from hell // which I have no idea // why it was chosen.
Because it doesn't conflict with any pre-existing C(++) syntax. You can always use // for single line comments, and /* */ for multiline comments. That way, you won't need to type more than 4 comment delimiter characters however long it is. And most comments are somewhat longer than 4 characters! Stewart. -- My e-mail is valid but not my primary mailbox, aside from its being the unfortunate victim of intensive mail-bombing at the moment. Please keep replies on the 'group where everyone may benefit.
Jun 07 2004









"Marc" <iam here.net> 