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,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cc4f25d878383cc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-10 06:09:29 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: Ian0Kerr@my-deja.com (Ian) Newsgroups: comp.lang.ada Subject: Re: Dimensions (was Re: Another Idea for Ada 20XX) Date: 10 Dec 2001 06:09:29 -0800 Organization: http://groups.google.com/ Message-ID: References: <3C0AACCE.329CFB60@worldnet.att.net> <45601fc.0112031740.3e217c8a@posting.google.com> <3C0CF4E3.A53D20A7@sparc01.ftw.rsc.raytheon.com> <3C0EF0A0.9F42EDB4@adaworks.com> <7KbQ7.13821$L51.28784@rwcrnsc54> NNTP-Posting-Host: 141.245.40.230 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1007993369 24289 127.0.0.1 (10 Dec 2001 14:09:29 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 10 Dec 2001 14:09:29 GMT Xref: archiver1.google.com comp.lang.ada:17670 Date: 2001-12-10T14:09:29+00:00 List-Id: "Mark Lundquist" 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