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: 109fba,df854b5838c3e14 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,df854b5838c3e14 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,df854b5838c3e14 X-Google-Attributes: gid103376,public From: ketil@ii.uib.no (Ketil Z Malde) Subject: Re: C/C++ knocks the crap out of Ada Date: 1996/02/20 Message-ID: #1/1 X-Deja-AN: 140326136 sender: ketil@trost.ii.uib.no references: <00001a73+00002504@msn.com> <3114d8fb.5a455349@zesi.ruhr.de> organization: II, UiB reply-to: ketil@ii.uib.no newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1996-02-20T00:00:00+00:00 List-Id: Since, as you say, these issues are religious, here's a little gospelling -- hope I don't miss the mark entirely: Ian said: For imparitive programming and in general: * C++ is not strong typed. You can point a string to an integer to a float and the most you'll usually get is a compiler warning. Don't you need a cast to do this?!? * C++ functions can be anywhere. On more than one occasion I have had to result to using "grep" on a large directory of files because a programmer decided to just throw it in to a file for no obvious reason. This is, of course true. Use [ce]tags, or some other scheme to navigate your source code. * Ada makes it more clear on what parameters for functions (procedures and functions) do and what happens to them. It is not uncommon to send a pointer to a function in C++ even though the function doesn't change anything. ..which is why you declare it as "const" (even though I know you can probably still fool it) * Here is a good religious issue: C and C++ pick lousy names for the standard library functions and classes. Whatever. * Ada is case insensitive. C and C++ both care about the case you use. I care, too, so that suits me fine. Matter of taste? * There are stylistic differences. [...] * C++ templates and exceptions are a pretty new standard for the language, until recently the compiler vendor decided how to handle them. They aren't really in wide use yet. Hmm...I think templates are coming along nicely, at least the STL seems to gain some foothold, don't you think? Any compilers *still* not supporting templates? I doubt it. * C++ won't let you range types: a la "type year is an integer from -2000 to 2050" or like that. But you can easily write one yourself, and make your own choices when there's a tradeoff between flexibility and performance. * C++ enums are still typically just integers, is this changing? I believe so -- though don't bet on it. * C and C++ have macros, I don't think ada has a feature like that. I thought macros were bad? Anyway, I think cpp adds some nice features every now and again. [...] * I think I like the emacs mode for ada more than the C++ mode that I have. I do wish cc-mode would support highlighting template definitions as well, yes. -kzm