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,6b6619eb9cada212 X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: Help me to chose between ADA 95 and C++ Date: 1999/12/15 Message-ID: <838p1u$efd$1@nnrp1.deja.com>#1/1 X-Deja-AN: 561047102 References: <01bf37fb$a91afb60$0564a8c0@IS-D2D04C.test> <829rbv$a8m$1@nntp6.atl.mindspring.net> <01bf3e32$0b9dc880$022a6282@dieppe> <385112AE.7E2CFA9@rdel.co.uk> <833d8i$sjf$1@nntp5.atl.mindspring.net> <38566835.B4A2D48@rdel.co.uk> X-Http-Proxy: 1.0 x33.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Dec 15 19:10:01 1999 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.6 [en] (WinNT; I) Date: 1999-12-15T00:00:00+00:00 List-Id: In article <38566835.B4A2D48@rdel.co.uk>, Chris Powell wrote: > Equal care is required in Ada, but possibly for different reasons. If > types are defined incorrectly the resultant code ends up worse than if > no types were used. Although explicit type conversions are required > which should alert the programmer to a potential violation of the > intended design, often there end up being so many conversions > everywhere that the programmer no longer gives them a second thought. There are two possible things you could be talking about here: Explicit type conversions between numeric types with constrained ranges. Unchecked_Conversion conversions. If you are talking about the latter, you are describing heinously bad code. You should almost *never* see an unchecked conversion outside of an OS or external language interface, or perhaps a stream implementation. If you are talking about the former, you're right. Generally we try to avoid excessively constrained numeric types, as doing conversions to and from them just to handle temporary range excedences in intermediate calculations is a real pain. I think the only constrained numeric types we use are angle types (which are in their own package with mathematical and conversion operations for them). > At least C++ has something in the way of a useful library that is part > of the ANSI standard for the language. I always use STL containers now Unfortunately that standard isn't nearly as well adhered to as Ada's. Check out the STL threads in comp.os.vxworks for an example. I have only seen one thread here *ever* about an incorrect implementation of annex A. > As for compiler publishers, the support we receive for our Ada > environment is expensive and unhelpful. The Ada language requires a > more complex compiler which has led to far more compiler bugs than > C++, and we find more of them because the developer base for Ada is so > much smaller than that of C++. And the compiler is so slow! Wow I've That's really wierd, because I'd say just the opposite (well, perhaps not the "expensive" part). But most sources will tell you that the C++ standard is *more* complicated. I'd say the amount of compiler bugs, if indeed they are more (I don't know that for a fact) are probably due to you using a much less exercised compiler for Ada than you do for C++. My experience with Ada vendors (Aonix, Rational, GreenHills, OC, ACT "unsupported") has shown them all very responsive. Certainly moreso than I could expect from Microsoft. -- T.E.D. Sent via Deja.com http://www.deja.com/ Before you buy.