I can't resist putting on my surly curmudgeon hat to disagree
about the value of "const".

In my experience, the hypothetical errors the compiler will
catch for you are almost totally nonexistant, yet the work
of complying with the A-R compilers nit-picking is a constant
(heh!) drain or resources that could be spent on real problems.

Possibly relevant questions: How many man hours have just
been spent on adding const around the perl source? In that
time, how many actual bugs have been detected and fixed
by the compiler's const checks (I'm talking real bugs here,
not merely new places where transitive closure of const forces
the addition of more const modifiers to satisfy the compiler).

Of course, my sour outlook is much worse because I deal with
C++ most of the time where const is a far more virulent virus
than it is in C. Take a look an any STL implementation sometime.
There are two copies of just about every template definition.
One for the const case, and one for the not const case. When
compiler nit-picking forces you to duplicate all your code,
you have a serious misfeature on your hands. How many more
bugs are introduced because you forget and fix only one case
of your template than are ever found because of the const checks?

I know, I know, nobody agrees. But it is good to get on record
so computer historians 1000 years from now will know there was
one sane voice in the madness :-).

Reply via email to