long identifiers
Peter Holzer
hp at vmars.tuwien.ac.at
Fri Oct 26 01:06:04 AEST 1990
chip at tct.uucp (Chip Salzenberg) writes:
>From my wall:
>"10. Thou shalt foreswear, renounce, and abjure the vile heresy which
> claimeth that 'All the world's a VAX', and have no commerce with
> the benighted heathens who cling to this barbarous belief, that
> the days of thy program may be long even though the days of thy
> current machine be short."
> -- "The Ten Commandments for C Programmers" by Henry Spencer
And a few lines higher on your wall (and mine) it reads:
9. Thy external identifiers shall be unique in the first six
characters, though this harsh discipline be irksome and the
years of its necessity stretch before thee seemingly without
end, lest thou tear thy hair out and go mad on that fateful
day when thou desirest to make thy program run on an old system.
But replacing long identfiers by short ones can be automated easily with
an awk script or the shroud program posted a few months ago, so I don't
think the length of identifiers should be a criterion while writing your
program.
IMHO you should write your program readable, and long identifiers add a lot
to readability. Restricting identifier names to 6 characters is a BUG and
not a FEATURE, and I think you should work around bugs only if you encounter
them.
There are other problems with porting C programs that are a lot more
difficult to solve (especially between ANSI-C and pcc-derivatives), so
lets concentrate on solving these.
--
| _ | Peter J. Holzer | Think of it |
| |_|_) | Technical University Vienna | as evolution |
| | | | Dept. for Real-Time Systems | in action! |
| __/ | hp at vmars.tuwien.ac.at | Tony Rand |
More information about the Comp.lang.c
mailing list