Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
June 05, 2004 Comments in C, C++, C# and D major | ||||
---|---|---|---|---|
| ||||
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. |
June 05, 2004 Re: Comments in C, C++, C# and D major | ||||
---|---|---|---|---|
| ||||
Posted in reply to wolfgangamadeus | 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. > > |
June 05, 2004 Re: Comments in C, C++, C# and D major | ||||
---|---|---|---|---|
| ||||
Posted in reply to Charlie | > >I prefer the pound comment to that hideous // /* */ trogolith from C. > Trogolith ? Fun word! But i couldnt find a defintion ? 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... |
June 05, 2004 Re: Comments in C, C++, C# and D major | ||||
---|---|---|---|---|
| ||||
Posted in reply to wolfgangamadeus | 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
|
June 06, 2004 Re: Comments in C, C++, C# and D major | ||||
---|---|---|---|---|
| ||||
Posted in reply to wolfgangamadeus | 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 .... |
June 07, 2004 Re: Comments in C, C++, C# and D major | ||||
---|---|---|---|---|
| ||||
Posted in reply to wolfgangamadeus | 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. <snip> 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. |
Copyright © 1999-2021 by the D Language Foundation