From: mheaney@ni.net (Matthew Heaney)
Subject: Re: Tagged Types and Generics
Date: 1997/04/26
Date: 1997-04-26T00:00:00+00:00 [thread overview]
Message-ID: <mheaney-ya023680002604972101470001@news.ni.net> (raw)
In-Reply-To: dewar.862004577@merv
In article <dewar.862004577@merv>, dewar@merv.cs.nyu.edu (Robert Dewar) wrote:
>Bob Leif says
>
><<Background: Recently, Tom Moran, Randy Brukard and I wrote a paper. "Ada
>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.
<http://sw-eng.falls-church.va.us/AdaIC/standards/83rat/html/ratl-07-03.html
#7.3>
--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271
next prev parent reply other threads:[~1997-04-26 0:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-04-21 0:00 Tagged Types and Generics Robert C. Leif, Ph.D.
1997-04-24 0:00 ` Jeff Carter
1997-04-25 0:00 ` Robert Dewar
1997-04-26 0:00 ` Matthew Heaney [this message]
1997-04-26 0:00 ` Tom Moran
1997-04-27 0:00 ` Nick Roberts
1997-04-28 0:00 ` Robert I. Eachus
1997-04-28 0:00 ` Tom Moran
-- strict thread matches above, loose matches on Subject: below --
1997-04-26 0:00 Robert C. Leif, Ph.D.
1997-04-27 0:00 ` Robert Dewar
1997-05-02 0:00 ` Nick Roberts
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox