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,671b51ed092851a5 X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Language Choice Date: 1997/11/01 Message-ID: #1/1 X-Deja-AN: 286521365 References: <3458BECE.7C69E1B6@earthling.net> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-11-01T00:00:00+00:00 List-Id: In article <3458BECE.7C69E1B6@earthling.net>, Charles Hixson wrote: >I am approaching a decision between Ada95 and Eiffel. Why should I >choose Ada? As the other posts have indicated, it depends on what you want to do. Ada has obvious superiority with respect to safety-critical and real-time programming. It was designed so that you never need to use heap (a no-no for safety-critical systems), and concurrency is built into the language (did Eiffel ever get "separate" going?). The real-time annex also supports the Priority Ceiling protocol, which guarantees (I think) that deadlines get met. The safety-critical annex can be used to detect uninitialized variables, or even to annotate the object code generated by the compiler. Meyer was heavily influenced by Hoare, and so Eiffel has a rich facility for specifying axiomatic semantics of abstractions; it is also a pure object-oriented language. Ada is strongly typed, and allows you to specify (range or index) constraints for an abstraction. Ada 95 is also fully object-oriented, but doesn't force you to program using that paradigm, as Eiffel does. Ada was designed specifically for systems programming. It allows (but doesn't require) the programmer specify the representation of types and objects, which is necessary when communicating over an external interface. Does Eiffel have fixed point types? Ada has a rich facility for capturing the semantics of abstractions that have an absolute (not relative) error. For example, you can declare a thermometer temperature as type Temperature_In_Celcius is delta 0.1 range -40.0 .. 100.0; which might map (say) to the range of a digital temperature sensor. The Ada 95 information systems annex also has support for decimal fixed point types (having a delta in powers of 10). If you were writing a payroll program or some financial software - where monetary mistakes cannot be tolerated - then again Ada is an obvious choice, superior even to COBOL. If you're writing a word-processor or something, where little close-to-the-metal programming is necessary, the argument for Ada is less compelling. This doesn't mean you can't do it in Ada, or that it's more difficult to do in Ada. It's just that Ada is a language that lets you get under the hood (for example, you can even implement your own storage pools), and that language feature isn't required for many applications. (Languages as C++ or CLOS go even farther than Ada in letting you get under the hood, but are inherently unsafe.) If you were new to the object paradigm, and no systems programming were required for your application, then Eiffel would be a good choice. Its pure approach forces you to program using an object-oriented style, and so that would hopefully force you to think in terms of objects. Many Ada programmers never learn object-think, because Ada doesn't require you to program that way. -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271