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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Type naming conventions: Any_Foo Date: Sat, 7 Dec 2019 14:05:02 +0200 Organization: Tidorum Ltd Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net B+BIFrDoTZInwwj5O6S0yQcXhpaujhMhUaB1epWmf+0WNcgKRQ Cancel-Lock: sha1:DZ/QxIVKwWC5Bi6TC+LVzrEiORc= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:57687 Date: 2019-12-07T14:05:02+02:00 List-Id: On 2019-12-07 12:19, Jeffrey R. Carter wrote: > On 12/6/19 10:55 PM, Niklas Holsti wrote: >> On 2019-12-06 22:11, Jeffrey R. Carter wrote: >>> On 12/5/19 10:33 PM, Niklas Holsti wrote: >>>> >>>>     Weapon : Weapon_Id; >>>> >>>> The variable Weapon does not represent a Weapon; it represents an >>>> identifier of a Weapon, so the name Weapon is IMO a little misleading. >>> >>> Obviously there are no weapons in the S/W; there are only bit >>> patterns that you have decided to interpret in various ways. But if >>> you're modeling the problem space and it contains something called >>> Weapon, then your software had better have something named Weapon it >>> in, too. >> >> Agreed. > > And obviously the thing in the software named Weapon contains a bit > pattern that you interpret as identifying the actual Weapon in the > problem space. Yes, there may be some "identifier" bits, if (for some reason) Weapons need identifiers. > In other words, Weapon contains a Weapon identifier, Possibly, but the internal model of a weapon usually contains much more than just an identifier: it contains bits that define the properties and state of the weapon. > and the declaration is not misleading at all. If all the program knows of a weapon is its identifier (Weapon_Id), your approach is tolerable (but I still don't like it). If the program has more knowledge of the weapons, so that there is a type Weapon in addition to the type Weapon_Id, I remain firm in my view. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .