git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Avoid C++ comments, use C comments instead

From
OGOlivier Galibert <galibert@pobox.com>
Date
Jul 10, 2006, 23:42 UTC
Message-ID
<20060710234234.GA26528@dspnet.fr.eu.org>
In-Reply-To
<Pine.LNX.4.63.0607110049470.29667@wbgn013.biozentrum.uni-wuerzburg.de>
On Tue, Jul 11, 2006 at 12:55:59AM +0200, Johannes Schindelin wrote:
> Judging by what you say, one could get the impression you'd have not much 
> sympathy for people being stuck with non-C99 compilers.

More and more these people are stuck with such a compiler because they want to be.

> Just look at it: if the OS vendor just does not _care_, and you blame the 
> vendor for not providing something newer, the vendor does not _care_ about 
> your complaint either. But the user does.

Well, I'm not talking about git here, but I'm not really interested in making my code harder to maintain just to provide more value for said vendor.

> However, there is a more important point to be made. If you are complying 
> with an older standard, you get more users. More users = more bug testers.

On such systems, what you tend to find is bugs of the system, or simply different, and sometimes somewhat nonsensical, implementations of some compromise-happy standards like POSIX.

> And there were quite a few occasions where I found bugs by trying to run 
> on a different platform, which was less forgiving than Linux. These are 
> bugs you have a harder time to spot on Linux, _because_ Linux is so nice. 
> But they will surface. And they will be a PITA to find.

And how many bugs or "features" of the platform did you have to code around before finding a genuine bug?

> Anyway, it is best practice for a reason to program portably. (Well, at 
> least if you are not living in Redmont.)

If "programming portably" meant catering to the oldest standards, then you shouldn't even use prototypes or ansi-style function declarations. After all, some people may be stuck with the old sun (or was it hp?) compiler that was k&r only. And limit the filenames to 14 characters. Also, you shouldn't require gtk, python, perl, fire or the wheel.

  OG.
Previous: Junio C HamanoNext: Pavel Roskin
Message 13 of 14 in “Avoid C++ comments, use C comments instead”
  1. Avoid C++ comments, use C comments insteadPavel Roskin, Jul 10, 2006
  2. Junio C HamanoJul 10, 2006
  3. Olivier GalibertJul 10, 2006
  4. Johannes SchindelinJul 10, 2006
  5. Olivier GalibertJul 10, 2006
  6. Paul SericeJul 10, 2006
  7. Olivier GalibertJul 10, 2006
  8. Johannes SchindelinJul 10, 2006
  9. Yakov LernerJul 10, 2006
  10. Olivier GalibertJul 10, 2006
  11. Shawn PearceJul 11, 2006
  12. Junio C HamanoJul 11, 2006
  13. Olivier GalibertJul 10, 2006
  14. Pavel RoskinJul 11, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.