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,fcdd0f6139250dc5 X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Tagged Types and Generics Date: 1997/04/26 Message-ID: #1/1 X-Deja-AN: 237640966 References: <3.0.32.19970421225247.007129f4@mail.4dcomm.com> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-04-26T00:00:00+00:00 List-Id: In article , dewar@merv.cs.nyu.edu (Robert Dewar) wrote: >Bob Leif says > ><95, The Language Speaks for Itself". This paper will appear in the May >Object Magazine. In this paper we modeled money as a decimal type and did >inheritance directly via a generic. I had suggested modeling money as a >tagged type. My co-authors very wisely vetoed that approach. After the>> > >I can't see any reason for wanting to model money as a tagged type -- you >lose literals, and you lose a lot of other useful semantics of decimal >types, and you gain nothing that I can see. Agreed. Derivation is a much more natural technique for modeling different currencies. See section 7.3 of the Ada 83 Rationale which uses that very example. -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271