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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2078dddcdcd8d83 X-Google-Attributes: gid103376,public From: Stephen Leake Subject: Re: Warning: Religious naming convention discussion :-) [was: assign help!!] Date: 1997/05/14 Message-ID: <337A1B42.7276@gsfc.nasa.gov>#1/1 X-Deja-AN: 241557423 References: <33779E0D.61F8@sprintmail.com> <3378BBD2.7BBA@this.message> <3379606E.413E@sprintmail.com> <5lcefp$riu$1@ash.ridgecrest.ca.us> Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Reply-To: Stephen.Leake@gsfc.nasa.gov Newsgroups: comp.lang.ada Date: 1997-05-14T00:00:00+00:00 List-Id: Do-While Jones wrote: > > Speaking from a maintenance point-of-view, I certainly prefer > > package Angles is > > type Degrees is digits ...; > > to > > > package Angles is > > > > type Angle_Type is digits ...; -- in degrees > > because it eliminates the need to "grep Angle_Type angles.ads" to see if a > variable of Angle_Type (declared in a different package) is expressed in > degrees or radians. But this package does not prevent someone from writing: Angle_In_Radians : Angles.Degrees := Item / 360.0; If you are trying to enforce units, you need a private type. But then you need a system of private types providing all units, so this is not an isolated case. > > Never express in a comment that which can be expressed in the code. > More importantly, don't pretend you are providing an abstraction that you are not! > > Do-While Jones > -- - Stephe