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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1f0e8beefacb537e,start X-Google-Attributes: gid103376,public From: dkristol@see-my.sig (David Kristola) Subject: Engineering types hierarchy Date: 1999/09/08 Message-ID: <7r50i7$e893@svlss.lmms.lmco.com>#1/1 X-Deja-AN: 522431718 Distribution: world Organization: heaps of stacks Followup-To: comp.lang.ada Reply-To: dkristol@see-my.sig Newsgroups: comp.lang.ada Date: 1999-09-08T00:00:00+00:00 List-Id: Hello, I am trying to put together a robust and easily usable hierarchy of types packages to support a collection of engineering units (kilograms, meters, seconds, etc.) in scalar, vector, and matrix forms. So far, i have a list of the base types and combined types (meters per second and so on) that are going to be used on this project. There is an explosion of operators that i have to implement. "/" for meters and second returning meters per seconds, and on, and on, and on. Of course, there is nothing special about these operators beyond the typing they do. With a few "use type" statements, coding up algorithms has been a breeze, and unit problems show up when i try to compile (kg*m^2 being the same as N*m*s^2 was only a minor nuisance). So far, the plan is to set up the hierarchy of child packages as such: Numeric_Types Numeric_Types.Vectors Numeric_Types.Matrices Numeric_Types.Quaternions Numeric_Types.Double Numeric_Types.Double.Vectors Numeric_Types.Double.Matrices Numeric_Types.Double.Quaternions Is there a better way? (No, this is not a class project) Thanks, --djk, keeper of arcane lore & trivial fluff Home: David95037 at aol dot com Work: david dot j dot kristola at lmco dot com Spam: goto.hades@welovespam.com