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: 115aec,f41f1f25333fa601 X-Google-Attributes: gid115aec,public X-Google-Thread: 103376,a3ca574fc2007430 X-Google-Attributes: gid103376,public From: james@cdac.com (James Thiele) Subject: Re: Ada and Automotive Industry Date: 1996/11/08 Message-ID: <1996Nov8.183051.21638@ole.cdac.com>#1/1 X-Deja-AN: 195423251 sender: news@ole.cdac.com (Usenet News) references: <3280DA96.15FB@hso.link.com> <1996Nov6.210957.3070@ole.cdac.com> organization: Cascade Design Automation, Bellevue, WA newsgroups: comp.lang.ada,comp.realtime Date: 1996-11-08T00:00:00+00:00 List-Id: In article eachus@spectre.mitre.org (Robert I. Eachus) writes: >In article <1996Nov6.210957.3070@ole.cdac.com> James Thiele writes: > > > The language itself was hardly consistent. Quick, why is > > for i in -1..1 -- illegal in Ada 83? > > Because the call to "-" is ambiguous. The only reason this was a >surprise is that Ada 83 had a special rule to resolve the ambiguity >and choose a type for i in the "most common" cases. But this didn't >fit that mold, since users can redefine "-". However, if you write: > > for I in Integer range -1..1 loop... > > It is legal and compiles fine. (But you may have wanted some other >type...that's why you got the error.) That's not how I remember it. The ".." operator required that both of it's arguments be of the same "type" (the Ada LRM probably used another term) and -1 was considered an expression, but 1 wasn't. I prefer a language where if I write a statement that looks like it should be legal it is. Even PASCAL accepts for i:= 1- to 1 do ... > > In Ada 83 you can't schedule a periodic event reliably -- no Ada > > task was guaranteed to run at the time requested. Everyone I knew > > who used Ada for avionics in the 80s wrote their own scheduler. > > A HUGE amount of wasted effort because people couldn't be bothered >to read the reference manual. What the Ada 83 RM said, and pretty >plainly at that, was that a critical task would run exactly (within >the limits of accuracy of the physical clock, etc.) when scheduled, >unless there was an equal or higher priority task using every >available processor. There was even an AI, published as a >ramification, titled "Preemptive scheduling is required" (AI-32). >Can it get any clearer? > We didn't find any Ada compiler vendors in the 1986-88 era who supported preemptive scheduling. And they all talked to us, because we were potentially a huge customer. Do you know any? Anyway, I saw this on the realtime newsgroup. If I'd noticed the crossposting to comp.lang.ada I'd have stayed away. -- James Thiele james@cdac.com (work) or jet@eskimo.com (home) http://www.eskimo.com/~jet