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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c7ea1cb7a2beb2ee X-Google-Attributes: gid103376,public From: mark_biggar@my-deja.com Subject: Re: Disallowing Pre-Defined Operations Date: 2000/03/16 Message-ID: <8ar5nu$sfv$1@nnrp1.deja.com>#1/1 X-Deja-AN: 598359191 References: <8a9eeg$qtv$1@newpoisson.nosc.mil> <8ababr$c3u$1@wanadoo.fr><8afhed$f9v$1@newpoisson.nosc.mil> <8aoifb$49f$1@newpoisson.nosc.mil> <38D001D7.4D6E4284@averstar.com> <8aqc0e$n851@ftp.kvaerner.com> X-Http-Proxy: HTTP/1.1 sji-ca-cache[0A000002] (Traffic-Server/2.2 [uScMs f p eN:t cSMi p s ]), 1.0 x21.deja.com:80 (Squid/1.1.22) for client 165.236.189.201 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Thu Mar 16 17:30:46 2000 GMT X-MyDeja-Info: XMYDJUIDmark_biggar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.72 [en] (Win98; I) Date: 2000-03-16T00:00:00+00:00 List-Id: In article <8aqc0e$n851@ftp.kvaerner.com>, "Tarjei T. Jensen" wrote: > > Tucker Taft wrote in > >I understand your goal, and it is reasonable. The usual question is > >whether it is worth the cost. There are so many great ideas that > >are possible, but only so many can be accommodated in a single > >language. What you really want are a small number of very powerful > >and flexible concepts that allow you to solve all the > >interesting problems elegantly and safely. Personally, I would like a full-up > >"units" capability, where generally A * A => A is not defined, since > >that doesn't balance from a units point of view. I have some ideas > >how to get there, and would be interested in opinions from others. > >The techniques using discriminants are unsatisfactory in my view, > >and too "heavy." VHDL has the notion of "units" built into the language, > >and its approach should probably be evaluated. > > I think a "units" facility will be very attractive. I would think that it > woulld make Ada more attractive to the people who would ordinarily use Fortran. > I also think that it might be useful for those who create safety or life > critical software. > > I think it is long overdue to be able to add oranges and apples and get fruit > as the result. > > Whether this is achived by adding keywords or pragmas, I don't care. I have always thought that a simple pragma to turn on some compiler support for the Discriminate record Units implementation, so that the compiler automatically generated the code for the necessary discriminate comparisions on "=", "<", "+", "-", etc. and also generated necessary discriminate recomputation on "*" and "/". This would allow the compiler to optimize the static cases. The user would only have to define the math part fo each operation, the compiler would generate every thing else. -- Mark Biggar mark@biggar.org Sent via Deja.com http://www.deja.com/ Before you buy.