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,9afe16648c0a7435 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Problem Compiling with GNAT Date: 1999/03/16 Message-ID: #1/1 X-Deja-AN: 455704029 References: <7cj6nt$rvh$1@nnrp1.dejanews.com> <7cjm4g$avo$1@nnrp1.dejanews.com> <7ck8pk$2co$1@remarQ.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: nntp1.ba.best.com 921608188 210 bpr@206.184.139.136 MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-03-16T00:00:00+00:00 List-Id: On 16 Mar 1999 fraser@sinopsis.com wrote: > paene lacrimavi postquam Larry scribavit: > > >In article , > > >> "Class" is a horrible choice for the name of a type. Why don't you just > >> name the type "Fire_Mission"? > > >I agree. I inherited this code, don't understand it yet, and am trying to get > >as much of it to compile as possible with minimum changes. Actually, > >Fire_Mission is the name of one package in which a type Class is defined. > > I remember reading somewhere (might have been an article on adahome, > can't remember) about a coding, uh, paradigm for want of a better word, > which created a class hierarchy using child pacakages to define names, > and having exactly one tagged type per (leaf) child package, which is > always called 'Object' or 'Class' or 'Instance' or whatever. > > I tried it and didn't like it (and I didn't inhale either). However, > what I've found lately is that the idea of defining exactly one tagged > type in each package seems valuable. It makes packages small, and > maintenance easier. Well, it has so far. We'll see. One thing I'm trying, and liking, is the Modula-3/OCaml naming style like so package Lists is type T is ...; -- Main type is always "T" type Iterator_T is ...; -- Subordinate types named "_T" ... which is similar to the "Class" style. This goes part of the way to the one (tagged) type per package style, but acknowledges that you may want to declare some helper types too. I believe I can get used to just about any consistent coding style, and this one has the virtue of being terse, especially when wielded by anti-"use" fanatics :-). -- Brian