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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,92471489ebbc99c6 X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: Y2K Issues Date: 1998/11/02 Message-ID: <71kjiq$qsv$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 407564196 References: <71aejn$ped$1@nnrp1.dejanews.com> <71ckkt$n4a$1@nnrp1.dejanews.com> <71dott$cm0$1@nnrp1.dejanews.com> X-Http-Proxy: 1.0 x9.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Mon Nov 02 15:36:57 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.05 [en] (WinNT; I) Date: 1998-11-02T00:00:00+00:00 List-Id: In article <71dott$cm0$1@nnrp1.dejanews.com>, dewarr@my-dejanews.com wrote: > In article <71ckkt$n4a$1@nnrp1.dejanews.com>, > dennison@telepath.com wrote: > > children of their pacakges. My implementation of this package is *still* > > dependent on their implementation of Ada.Real_Time.Time_Span. Its just that I > > was forced to do Unchecked_Conversions to accomplish it. (I feel so dirty!) > > And now when their implementation does change, I might not notice until > > runtime. If they'd let me make a child package I could have gotten a compile > > error when the implemetation changes. > > You cannot count on having got a compile error if the implementation changes. > You might or might not. Just as your unchecked conversion might have got a > warning if the sizes were different (I assume your compiler provides this Given their implementation of Ada.Real_Time.Time_Span, it is a simple matter to write a program that will convert it into a Float, and will survive minor type changes with only a recompile (using 'first and 'last on the field's type). Yes, they could hose me by dropping the interger subtypes altogether. But the way I had to do it with Unchecked_Conversion *any* range change will hose me. But perhaps this isn't too good of an example. I was forced into this unsafe situation by a compiler bug in Ada.Real_Time.To_Time_Span. (The language definition bug of not providing a To_Time_Span for Float was only a secondary consideration.) When the next compiler version comes out it'll probably have the problem fixed, and I'll need to recode things anyway. Providing this facility because of the possible need to work-around compiler bugs seems a bit too pessimistic. -- T.E.D. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own