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: Matthew Heaney Subject: Re: Naming of Tagged Types and Associated Packages Date: 1998/08/08 Message-ID: #1/1 X-Deja-AN: 379036858 Sender: matt@mheaney.ni.net References: <6qfp80$p0u$1@nnrp1.dejanews.com> NNTP-Posting-Date: Fri, 07 Aug 1998 19:19:34 PDT Newsgroups: comp.lang.ada Date: 1998-08-08T00:00:00+00:00 List-Id: doylep@ecf.toronto.edu writes: > 2. It allows you to avoid contrivances by permitting things like this: > > class CAR > > feature > steering_wheel : STEERING_WHEEL > > end > > What else are you going to call the steering wheel? A > direction_control_device? I think any other name would be contrived. I usually qualify auxiliary types with the name of the "main" type, so I probably would have named the type Car_Steering_Wheel, and the object Steering_Wheel. package Cars is type Car_Steering_Wheel is ...; type Car is tagged record Steering_Wheel : Car_Steering_Wheel; end record; This is the convention used in package Text_IO, for type File_Mode. This is another reason why use clauses are safe. The naming convention makes it obvious that type Car_Steering_Wheel is declared package Cars.