List:Internals« Previous MessageNext Message »
From:Ingo Struewing Date:September 24 2010 7:10am
Subject:Re: [STYLE] could we allow // for comments alone on their line?
View as plain text  
Hi Guilhem,

Guilhem Bichot, 23.09.2010 19:35:

...
>     *  When writing single-line comments, the '/*' and '*/" are on the
> same line. For example:
...
>     * For a short comment at the end of a line, you may use either /*
> ... */ or a // double slash.
> 
> I have always interpreted those rules the following way: this is permitted:
> 
> /* blah */
> int x; // blih
> 
> but this is fordidden:
> // blah
> int x; // blih

I guess, this is common understanding of the rules. I believe that I did
always adhere to them too. But I always thought that from a strong
interpretation of the two sentences, the second example is not
forbidden. After all, the "// blah" comment is also "at end of a line".
In other words, I was always ready to use such comment when I find that
it makes the code better readable at that place.

However, as mentioned, I believe, I haven't found a place yet, where I
would have wanted to use it. In many cases I try to extend comments so
that they become multi-line, as they stand out better anyway. ;)

Regards
Ingo
-- 
Ingo Strüwing, Senior Software Developer, ORACLE Deutschland B.V. & Co.
KG, Riesstr. 25, D-80992 München, HRA München 95603, Komplementärin:
ORACLE Deutschland Verwaltung B.V., Rijnzathe 6, 3454PV De Meern,
Niederlande, HR Handelskammer Midden-Niederlande, Nr. 30143697,
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven
Thread
[STYLE] could we allow // for comments alone on their line?Guilhem Bichot23 Sep
  • Re: [STYLE] could we allow // for comments alone on their line?Joerg Bruehe24 Sep
    • Re: [STYLE] could we allow // for comments alone on their line?Mats Kindahl24 Sep
      • Re: [STYLE] could we allow // for comments alone on their line?Mark Leith24 Sep
      • Re: [STYLE] could we allow // for comments alone on their line?Davi Arnaut25 Sep
        • Re: [STYLE] could we allow // for comments alone on their line?Mats Kindahl25 Sep
          • Re: [STYLE] could we allow // for comments alone on their line?Davi Arnaut26 Sep
        • Re: [STYLE] could we allow // for comments alone on their line?Guilhem Bichot27 Sep
          • Re: [STYLE] could we allow // for comments alone on their line?Martin Hansson28 Sep
          • Re: [STYLE] could we allow // for comments alone on their line?Davi Arnaut28 Sep
  • Re: [STYLE] could we allow // for comments alone on their line?Ingo Struewing24 Sep
  • [STYLE] could we allow // for comments alone on their line?Michael Widenius30 Sep