comp.lang.ada
 help / color / mirror / Atom feed
From: Ian0Kerr@my-deja.com (Ian)
Subject: Re: Dimensions (was Re: Another Idea for Ada 20XX)
Date: 10 Dec 2001 06:09:29 -0800
Date: 2001-12-10T14:09:29+00:00	[thread overview]
Message-ID: <eb48e9c0.0112100609.74c5746b@posting.google.com> (raw)
In-Reply-To: 7KbQ7.13821$L51.28784@rwcrnsc54

"Mark Lundquist" <mlundquist2@attbi.com> wrote in message news:<7KbQ7.13821$L51.28784@rwcrnsc54

> But the worst is still to come :-).  These schemes are quite brittle and
> unscalable, because:
> 
> (d) you have to define all your visibly quasi-numeric operations on every
> combination of types for base and derived units, so you have a
> multiplicative explosion on your hands

Not if you define each only in terms of the nearest suitable type and
chain the conversions between them. Then you only have an O(N)
expansion where N is the number of unit types. If at compile time a
table is constructed with the conversions used in any builds then thes
will not be large in number.

E.g. 1 yard is 3 feet which is 3*12 inches which is 3*12*0.00254
metres.

I don't see any unsurmountable problem.

> (e) the explosion continues if you want more than one unit per dimension.
> It explodes in both new overloadings of the quasi-numeric operations, and
> also in the unit conversions.

See above. No explosion.
 
> Mark

Ian



  parent reply	other threads:[~2001-12-10 14:09 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-02 19:51 Another Idea for Ada 20XX Gautier Write-only-address
2001-12-02 22:36 ` James Rogers
2001-12-03 12:44   ` Marc A. Criley
2001-12-03 14:29     ` Larry Kilgallen
2001-12-04  0:25       ` Marc A. Criley
2001-12-04  1:40   ` Adrian Hoe
2001-12-04  1:56     ` Larry Kilgallen
2001-12-04 16:08       ` Wes Groleau
2001-12-04 17:48         ` Larry Kilgallen
2001-12-09 23:02           ` Nick Roberts
2001-12-10 16:22             ` Stephen Leake
2001-12-10 17:11               ` Wes Groleau
2001-12-10 20:30               ` Robert C. Leif, Ph.D.
2001-12-10 20:59                 ` Wes Groleau
2001-12-10 17:09             ` Wes Groleau
2001-12-10 17:32               ` Larry Kilgallen
2001-12-04 19:59         ` Vincent Marciante
2001-12-04 20:20           ` Wes Groleau
2001-12-04 22:18         ` Matthew Heaney
2001-12-06  4:14         ` Richard Riehle
2001-12-06 17:39           ` Wes Groleau
2001-12-07  0:55             ` Adrian Hoe
2001-12-07  9:01               ` Dmitry A. Kazakov
2001-12-07 11:49           ` Tarjei T. Jensen
2001-12-07 22:51           ` Dimensions (was Re: Another Idea for Ada 20XX) Mark Lundquist
2001-12-08  3:52             ` Richard Riehle
2001-12-08  5:28               ` Mark Lundquist
2001-12-08 18:59                 ` Matthew Heaney
2001-12-08 21:23               ` Wes Groleau
2001-12-09 22:15               ` Robert C. Leif, Ph.D.
2001-12-10 14:09             ` Ian [this message]
2001-12-03 14:56 ` Another Idea for Ada 20XX Mark Lundquist
2001-12-06 15:27   ` Philip Anderson
2001-12-07 22:51     ` Mark Lundquist
2001-12-10  9:01       ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox