C style
cjl at iuvax.UUCP
cjl at iuvax.UUCP
Tue Oct 15 01:19:00 AEST 1985
>> Some of us feel the same about breaks as we do about gotos. I won't use it,
>> continue either, and I won't let anyone in my shop use it. It is just a goto
> Why use a language if you dislike it ?? (-:
"Using an imperfect language" is quite common in the software industry.
It is for this reason, Ada is born. But five or ten years later when
Ada becomes popular, it is for the same reason we shall find some bugs in
that language. We can only use a language you like in the university.
In the real world, we have to use languages we don't like.
>> We use LOOP...LOOPUNTIL...ENDLOOP. I know, adding features to a language with
>> #define has problems,but at least that code is readable once you know what
>> constructs do, which is quite apparent. C should have that structure built in.
> Well, continue/break are also perfectly apparent once you know what they
>do, and if C had everything that everyone wanted, we'd be left with something
>that made York Ada look like tiny-P.
What we argue here is the style of programs that is easier to reason
and understood for common people. If we only write a program for ourselves
then everything is apparent because we know what it does.
It is not recommended to change the language tools arbitrarily. But if
we follow a common agreement , we can improve the coding style of "C"
without creating a strange appearance. Any programmer should have
no difficulty to read LOOP...EXIT...END etc.
C.J.Lo
Dept. of CIS, IUPUI
ARPA : cjl at Indiana@CSNet-Relay
UUCP : ...!iuvax!cjl
More information about the Comp.lang.c
mailing list