Just Wondering

Tainter tainter at ihlpb.ATT.COM
Wed Apr 26 08:29:55 AEST 1989


In article <12564 at lanl.gov> jlg at lanl.gov (Jim Giles) writes:
>From article <2006 at quanta.eng.ohio-state.edu>, by rob at raksha.eng.ohio-state.edu (Rob Carriere):
>> case sensitive?  Is it hurting you?

>1)  My job often requires me to work-on, debug, or rewrite other people's
>    code.  If the other person distinguishes "myvar" from "myVar" and
>    several similar cases, this causes considerable heartburn.

    There is one more options.  Design it into the language that case
    must match but that no two symbols when case ignored are allowed
    to be the same.  I.e.  case and Case is illegal!  Or add it to
    your coding guidelines and run the code through a checker to
    enforce it.

    Any votes for this?  It won't get my vote.  I like using WHITE
    and white as distinct, one the instantiation of the other, and
    don't agree it makes code harder to read.  As long a reasonable
    convention is used for why they differ in case there is little problem.

    Personally, I think people who do mixed case like MyVar should be shot!
    I can tolerate Variable but it had better be some special class of
    symbol (typedef, structure tag, class, etc.)

>
>2)  Since C distinguishes case, I can't use it to help the readability
>    of code by EMPHASIZING parts that I consider important.

    A frightening prospect!  This would force me to run all code I know
    you wrote through a filter to calm it down, which would be very
    messy under a change management system.  What you think you
    know what is important to the next guy reading the code?  This type
    of thing just distracts from general understanding of the code and
    context.

--johnathan.a.tainter--



More information about the Comp.lang.c mailing list