Subject: Re: '//' for comments in C code? (archivers/unace)
To: Ian Zagorskih <ianzag@megasignal.com>
From: mouss <usebsd@free.fr>
List: tech-pkg
Date: 01/22/2004 23:39:54
Ian Zagorskih wrote:
> If getting this way and of course to be consistent, you should ask authors
> to cast pointers right way [or at least some way..], remove/dump
> unreferenced variables and so so on. Nobody likes compiler's warnings, right
> ? IMO in most of cases the answer will be "No, we'r not willing to modify
> stable code" -> that will just raise conflicts with authors and as a result
> decrease the number of packages.
> 
> That's not so simple to get people to write a good and proper code :(

fully agreed.
besides, "//" is handy, nice and doesn't cause any problems to code, so 
if ther's anything to fix, it's the compiler:) so, the right answer is: 
"complain to your vendor".

Now that things are what they are (that is, compilers and coders won't 
change anything), I have 3 points to say:

- There is no point to put this in the hands of users when it can be 
handled by maintainers. so whatever solution is found, it's better to 
make a tool for the pkg maintainer to generate a patch instead of making 
this a build step for everybody, given the risks associated with such an 
approach.

- Now if it's not handled by the maintainer, I don't see any reason to 
make everybody (that's a lot of gcccccc people) suffer limitations of 
rarely used compilers (irix, solaris, ...). Portability is ok as long as 
it doesn't get on our way... Portability doesn't mean suppress all 
features of every platform/OS that can't be used elsewhere. It means 
make it work on that stuff but make it work good everytime everywhere.

- the third is that ad hoc solutions won't work, because the C language 
will always make you regret your hacks. You either manage it the C way 
or you get gone. so use cpp or any other tool that understands C to some 
extent (ctags, lint, ...) but not sed, awk, find, sh nor sendmail (of 
course you can use sendmail rewrite rules to do whatever you want, 
probably even to write a web server, but I'll only try when I get older 
losing my hair many years from now...:).



cheers,
mouss