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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,3d3f20d31be1c33a X-Google-Attributes: gid1014db,public X-Google-Thread: 1108a1,2c6139ce13be9980 X-Google-Attributes: gid1108a1,public X-Google-Thread: 109fba,2c6139ce13be9980 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public X-Google-Thread: fac41,2c6139ce13be9980 X-Google-Attributes: gidfac41,public From: donh@syd.csa.com.au (Don Harrison) Subject: Re: Is ADA as good for graphics programming as C? (WAS: Re: Avoiding the second historic mistake) Date: 1997/07/09 Message-ID: #1/1 X-Deja-AN: 255678789 Sender: news@syd.csa.com.au X-Nntp-Posting-Host: dev50 References: Organization: CSC Australia, Sydney Reply-To: donh@syd.csa.com.au Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel,comp.lang.c,comp.lang.c++ Date: 1997-07-09T00:00:00+00:00 List-Id: Donovan Baarda wrote: :Eiffel is IMHO a better choice for safety-critical applications without :excessive real time requirements. Design by contract obviously (and :measurably?) contributes significantly to program safety. Combining this :with a complete inheritanc heirachy of library classes with all the :contracts defined and inheritable has to make a huge difference. I agree on all points. Realtime development will be an interesting one for Eiffel if the SCOOP concurrency model is adopted. IMO, Eiffel will offer a better alternative to Ada, probably even for hard realtime systems. This is because SCOOP: 1) Allows safe sharing of data, 2) Allows easy reallocation of threads to different processors, and 3) Integrates concurrency with the class and contracting models. WRT 1), SCOOP provides automatic locking of shared data so that users don't have to worry about it. Adding protected types to Ada to protect shared data is a good idea, but if you use tasks on their own you have to roll-your-own data protection using semaphores, for example, which is error prone. While you can choose to do the right thing for new systems, your software will be more reliable if the language takes care of locking automatically. Also (as Robert Dewar is fond of reminding us), you're not always in a position to choose - for example when using legacy code. WRT 2), SCOOP allows you to reconfigure your system by re-allocating threads to different processors to optimise performance without changing any code. This is done in an external Concurrency Configuration File. This would be particularly valuable for realtime systems because you could logically partition the system according to how hard the realtime constraints are and allocate the hard bits to dedicated processors. Such partitioning would also allow liberal use of assertions in the softer parts of the system where performance is not critical. Some Ada implementations probably allow such flexibility as well but it certainly couldn't be any simpler than in SCOOP. WRT 3), by integrating concurrency with classes and contracting, SCOOP offers a simpler (just classes - not tasks + protected types), more flexible (objects are not constrained to being either active or passive; concurrent classes may be extended through inheritance) and more powerful (synchronisation and correctness may be inherited) model than Ada's. Don. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Don Harrison donh@syd.csa.com.au