From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d95b511473b3a931 X-Google-Attributes: gid103376,public From: smize@Starbase.NeoSoft.COM (Samuel Mize) Subject: Re: Language Choice and Coding style Date: 1996/06/29 Message-ID: <4r3c89$com@Starbase.NeoSoft.COM>#1/1 X-Deja-AN: 162771029 references: organization: NeoSoft, Inc. +1 713 968 5800 newsgroups: comp.lang.ada Date: 1996-06-29T00:00:00+00:00 List-Id: In article , Nasser Abbasi wrote: >I'd like to know why do C and C++ programmer > >pchWriteInThisStargeAndHardToReadWayLikeThis while the Ada programmers > >Write_In_Clear_And_Nice_Way_Like_This ?? My best understanding: In The Beginning, all we had was punched cards and simple teletype interfaces, so everything was all capitals. That's all there were. Also, compiler table-space was tight, so 6-character or 8-character identifier limits were common. Once lower case and longer identifiers became available, some people started writing longer identifiers, while others stayed with the older trs style. This is where IdentifiersLikeThis came from. I think this was first common in Pascal. I don't think Pascal had underscores in identifiers, I may be wrong. Underscores also take a little more effort to type, especially if you're not a good touch typist. So, the MixedCase identifier is still common in some quarters. One advantage to using underscores avoids the problem of accidentally reusing an indentifier. If your compiler is case-insensitive, you can use both DAndY (D and Y) and Dandy (Dandy) without realizing they're the same identifier. If your compiler is NOT case-insensitive, you've got worse nightmares unless you are very very careful about your cases, or unless you use all-lower or all-upper (which prevents MixedCase). The Ada philosophy is that we accept some difficulty for the writer to make things easier for the reader, so we generally use underscores in that environment. (Ada is case-insensitive, so you COULD use MixedCase, but most style guides discourage it.) Samuel Mize