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,2afac1a4161c7f35 X-Google-Attributes: gid103376,public From: nabbasi@earthlink.net Subject: Re: Distinguishing type names from other identifiers Date: 1998/01/14 Message-ID: <69kf9b$fjr@drn.zippo.com>#1/1 X-Deja-AN: 316128241 References: <69iq42$ukn@lotho.delphi.com> Organization: Original Zippo News Service [http://www.zippo.com] Newsgroups: comp.lang.ada Date: 1998-01-14T00:00:00+00:00 List-Id: In POSIX threads, types are named with a trailing "_t", as in pthread_mutex_t I found this to be clear and I like it, a little "_t" at the end is not much extra overhead on the eye. I have been programming more in Java lately and since Java is case sensitive, the convention in Java is to have the class name to start with an Upper case, while variables start with lower case. so, I can write Car car; and it will clear, and no need to have any post, or prefix stuff added to the name of the type to make it clear. I think this is one advantage of case sensetive languages, offcourse in Java this convention (Upper case for class name, lower case for variables) is strongly enforced, even though offcourse there is nothing in the language itself that forces anyone to follow this. my final 2 cents is that a trailing "_t" in Ada would be a good choice for a type name, I think "_type" is an overkill, and too much extra typing, but I prefer to see "_type" than nothing at all in the type name. Other conventions I use in my C++/Java programming is to use "m_" as the start of a variable name that is local to a class, this I find helps me when I am reading code to get a better feeling where things live without having to go look for them in the code. my 1.88 cents. thanks, Nasser