Re: comment style

Roger Espel Llima (espel@llaic.u-clermont1.fr)
Tue, 2 Dec 1997 11:29:49 +0100


Richard B. Johnson wrote:

> FYI My company recently purchased a source-code license for a 3-D imaging
> package. It costs about US$100,000. It could not be compiled on any
> available cross-compiler because the Vendor/Producer used '//' for
> comment delimiters.
>
> We needed to hire a SW Engineer to support this package because it
> contained about 1/4 million lines of code that had to be changed. This
> 'port' will take about a man-year when, in fact, we should not have
> required any such changes at all.

I'm confused about the need for a man-year of work there; granted, 1/4
million lines of code is an awful lot, but coulnd't it be done with a
4-line perl script?

ex: (untested...)

#!/path/to/perl -lpi.bak
if (m|//|) {
my ($b, $a) = ($`, $');
$a =~ s|\*/|**|g;
$_ = "$b /* $a */";
}

> Personally, I think:
>
> // This looks much better than...
> /* This....*/

I think it doesn't look that good, but *shrug* it's a matter of personal
preference.

> However, we must be careful when we try to force our personal preferences
> into something that has already been developed or is part of a continuing
> development effort.

That makes a lot of sense.

Whoops, a post without linux content... sorry all! :)

-- 
Roger Espel Llima
espel@llaic.u-clermont1.fr, espel@unix.bigots.org
http://www.eleves.ens.fr:8080/home/espel/index.html