A question of commas
Mark H. Colburn
mark at jhereg.Minnetech.MN.ORG
Wed Dec 13 07:17:47 AEST 1989
In article <1989Dec7.192215.27671 at aqdata.uucp> sullivan at aqdata.uucp (Michael T. Sullivan) writes:
>But more programmers (BASIC, pascal, etc.) use "i = i + 1", and using "i++"
>assumes future programmers working with the code know C. Obviously, the
>first choice is the correct choice :-|.
If the programmers that are maintaining the code do not know about the
little details of C, such as post decrement and post increment operators,
then they are going to have a really tough time understanding virtually any
code that uses the features of the language that make it so desirable.
Writing code to the least common denomonator is not a good way to write
code. If there are portable features of a language that would be known to
a competent programmer in that language, then you should use them. I
would say that using techniques which are tricky and unportable should be
avoided, unless they are absolutely necessary. You have to assume that the
person that is going to be working with your code is fluent in the language
that you are using, or that they will be learning quickly!
Portability is not just so that code can be moved to differenct
architectures and run, but also to allow programmers to move between
different architectures and understand code.
--
Mark H. Colburn mark at Minnetech.MN.ORG
Open Systems Architects, Inc.
More information about the Comp.lang.c
mailing list