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: Robert Dewar Subject: Re: Disallowing Pre-Defined Operations Date: 2000/04/07 Message-ID: <8ckf7f$9nl$1@nnrp1.deja.com>#1/1 X-Deja-AN: 607849568 References: <8a9eeg$qtv$1@newpoisson.nosc.mil> <38D2E598.262D1CD5@erols.com> <8b0pbg$aph$1@nnrp1.deja.com> <38D9A2E8.F720768@erols.com> <8bcalg$pmb$1@nnrp1.deja.com> <38EBDD10.65444727@earthlink.net> <38EC160F.E2A13F44@quadruscorp.com> <8cic1h$195$1@nnrp1.deja.com> <38ED3145.BE3CEC68@quadruscorp.com> X-Http-Proxy: 1.0 x42.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Fri Apr 07 11:02:12 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-04-07T00:00:00+00:00 List-Id: In article <38ED3145.BE3CEC68@quadruscorp.com>, "Marin D. Condic" wrote: > If its too hard to implement or you just don't think it has > enough interest for ACT to support it You missed my main point, which is that in the unlikely event that a compiler DOES want to support this efficiently, no change to the language is required, since Intrinsic can be used for this purpose. > The original question was basically "What new features would > it benefit Ada to have?" The fact that your compiler handled the user defined version inefficiently may say nothing more than that you were using an inefficient compiler, at least with respect to this particular issue. There is no guarantee that building a feature into the language means it will be done more efficiently on a given compiler. Indeed the only convincing input here from my point of view would be some user who programs it themselves, and actually measures that there is a performance problem. And if such a situation arose, as I mention above, no language change is necessary, one would simply improve the efficiency of the feature (I am quite unconvinced that Intrinsic would be required, since this seems something that can be programmed perfectly efficiently in Ada, but Intrinsic is there if needed). I actually find that very few Ada programmers properly understand the intrinsic feature of Ada 95, or even know of its existence. Pity -- because this is really an important part of the language design. I don't know about the rest of the world but if Ada had > saturated math data types *I* would have beaten it to death in the > engine control business. I'd suspect that other embedded programmers > would find the feature *very* useful and (here's the good part!) it > doesn't exist (that I am aware of) in the more popular languages for > that market sector. (Product distinction?) > > It doesn't sound to me like something that would require some massive > compiler rewrite or some fundamental change in Ada syntax or semantics. > I'm no expert, but it seems fairly small and self-contained such that a > compiler could provide it as an option that could be toggled by > switches. Syntax? Maybe "type T is saturated digits 6 ;" or "type T is > saturated range -128..127 ;" Maybe as a pragma? "pragma Saturate (T) ;" > I personally wouldn't be fussy. :-) > > MDC > -- > ============================================================= > Marin David Condic - Quadrus Corporation - 1.800.555.3393 > 1015-116 Atlantic Boulevard, Atlantic Beach, FL 32233 > http://www.quadruscorp.com/ > m c o n d i c @ q u a d r u s c o r p . c o m > > ***PLEASE REMOVE THE "-NOSPAM" PART OF MY RETURN ADDRESS*** > > Visit my web site at: http://www.mcondic.com/ > > "Because that's where they keep the money." > -- Willie Sutton when asked why he robbed banks. > ============================================================= > Sent via Deja.com http://www.deja.com/ Before you buy.