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,63a41ccea0fc803a X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Naming of Tagged Types and Associated Packages Date: 1998/07/28 Message-ID: #1/1 X-Deja-AN: 375689009 References: <6pdhfo$1br$1@platane.wanadoo.fr> <6pi0pf$df8$1@nnrp1.dejanews.com> <6pirk1$iar$1@nnrp1.dejanews.com> <6pknai$qst$1@nnrp1.dejanews.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: 901641347 23275 bpr 206.184.139.132 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-07-28T00:00:00+00:00 List-Id: On Tue, 28 Jul 1998 dennison@telepath.com wrote: > Brian Rogoff wrote: > > The second part of your assertion, that it leads to stupid things like > > Command_Type_Type, is completely false. I use the _Type convention, and > > and a similar convention in C, I've never had this problem arise. If you > > don't like that convention, fine, but don't just make up problems which > > don't really happen . > > Hmmm. I've seen it happen all over the place, in my code and others. Maybe it > hasn't happened to *you*, but that doesn't mean it doesn't happen. Heck, if > that logic works, I assert that death does not exist. After all, it hasn't > ever happened to me. Ha Ha! Now I'll live forever. Suffer, mortal fools! :-) Good one! However, my point wasn't that you couldn't do it, just that you'd have to be deliberately silly to do so (come on Ted, you really couldn't think of a better name than Command_Type_Type?). It would be like me using single letter names for everything, and then using the ensuing confusion to argue that names without the "_Type" are hopelessly confusing. Anyways, don't make up silly arguments against my preferred naming convention, and I promise not to comment on it again, OK? ;-) > > If you only have one main type per package, why not give it a single > > letter name like T or I (for Instance, yuk!)? > > Actually, that's a very valid point (I may be misreading you here, but heck, > I'm going with it). "Instance" is so undescriptive, it might as well be "I". You read me perfectly, though I'd prefer "T" to "I" as the name of the main type, for the reasons being discussed elsewhere. Also, this convention is widely used by our cousins in the Modula-3 community, and I'm told it is used in the Ada community too, ar least for explanation. It also makes sense if you eschew use clauses, and name your packages with the "class" name, in a module = type style of OOP. My issue with this is that I often coencapsulate types, and sometimes there is no main type in a package, though I suppose thats easy enough to fix by using T,U,V,W, ... or T1, T2, T3, ... -- Brian