Mail Archives: djgpp/2000/08/04/10:30:25
Kalum Somaratna aka Grendel wrote:
> > > As // is not a C feature, it is strictly a C++ feature.
> >
> > This is no longer true.
>
> Well you are correct according to the latest C spec, but still I don't
> find many (none) of the // in any of the GNU C based packages that I have
> browsed.
I'm not surprised - GNU code is usually intended to be portable.
Some of it is even supposed to work with K&R C compilers.
> Also if you want your C code to be portable between different
> compilers, I think as far as C code is concerned it would be wise to
> avoid //.
That's right, and the same is true of everything else that is new in C99.
(But `inline' is nice, and you can put it in a macro to avoid portability
problems.)
> I personally think that as vs the //, the /* */ leads to much more
> aesthatically appealing code.
That's probably true. // is OK in small quantities, but in bulk it tends
to look a mess.
S.
- Raw text -