Path: utzoo!attcan!uunet!mcvax!enea!sommar From: sommar@enea.se (Erland Sommarskog) Newsgroups: comp.lang.c++ Subject: Re: C++ vs Ada / how to name kittens Message-ID: <4098@enea.se> Date: 21 Nov 88 21:09:38 GMT Organization: ENEA DATA AB, Sweden Lines: 93 This has of course nothing to do with C++. I guess I ought to cross-post to comp.lang.ada and direct follow-ups there, but I thought I should save the readers of that group. As for you C++ fans I care less about you, since I don't read this group myself. Ted Holden borrows Bob Burch's account (bob@imspw6.UUCP) and writes: >I have watched a 30 line Ada program take 27 minutes to compile on a >multi-processor 68020 device with nothing else happening on it. And I have seen an Ada compiler compile in just as the same time as any compiler at that machine. I *have* seen compilers behaving something like the one Ted describes, but that was five years ago. Things have changed. A lot. True it takes longer time to get a program through the compiler. To some extent this could be blamed on language complexity, but mostly to the fact that the compiler finds more of your errors. >I have always had the impression that in computer science generally and >in government computer science more particularly, there has been about >an 80 - 20 mix of people who design things on paper and people who make >anything breathe and live on real machines. C began with real machines, >real computer users. The idea seems to have been: I haven't dealt with C, but I have dealt with langauges where simple implementation was considedered more important than a complete langauge. The look powerfull to begin with, until you stumble on all the cases which were not important to the implementors but to me. It's a question to look around the corner. It's good to have the language now, but it's not good to be stuck with all the limitations forever. >Ada is unbelievably slow, an unbelievable resource hog, involves constant >dilemmas over which is the real OS today, Ada or UNIX, Ada or Dos etc. i.e. I ran a very simple test on our machine here. (VAX 780, 4.3 BSD) A word- counting program in Ada (Verdix 5.41) took 2-3 times longer time than old "wc". On the other hand, the Pascal program was 5 times slower than Ada and the Fortran 3 one times. And don't jump to conclusion about the Ada-C relationship. Verdix uses far from all possibilities the VAX architecture offers (their compiler is a multi-target one). Looking at the code I'm surprised that the programs run as fast as they do. >do we use Ada tasking, again, frighteningly slow, or ordinary UNIX tasking >and inter-process communication, Ada source control or SCCS, etc. Naturally, >the Ada task manager and the UNIX process scheduler clash. My experience Ada wasn't designed to run real-time applications on a time-sharing system, one should have this is mind. Its real-time primitives were intended for embedded systems. Probably, with today's computers you have to resort to the target systems own process handling if you want to write a fast multi-tasking application in Ada for a system like Unix or VMS. Not really satisfactory. but what other options does other langauges offer you? >The verbiage hides the logic. When every >variable name looks like: > >"NUMBER_OF_CROWS_SALLY_ANNS_GRANDMOTHER_SHOT_WITH_HER_12_GAUGE_- >LAST_TUESDAY", > >then a single subroutine call (involving several >such variables) can take up a whole page. In my own scheme of >things, I try to keep literature and programming separate. So what says that you must use such names in Ada? If you love long names you can have them in C too. I prefer readable names rather than obscure abbreviations, but I don't fall into exagerations. >Ada threatens to leave DoD stranded and technologically >backwards. The better class of programmers coming out of the >schools will be used to the 2 second compiles of Turbo C and >Turbo Pascal. If they prefer to find the errors themselves and wasting a lot of time of testing, instead of having the machine finding them. Personally I prefer if I can trust as much as possible on the computer. I have enough of things to think of anyway. >If the program stays in effect for 5 years, >I'll make even more money teaching those same people Russian, which >they'll need at that time. You'd better believe, the Russians program in >C. If they do, I would stay calm. They will get a core dump before they can do any harm. To conlude: your Ada flames are based on a total misconception. Apparently you haven't been working with any serious Ada compiler. Come back when you have. -- Erland Sommarskog ENEA Data, Stockholm sommar@enea.se "Frequently, unexpected errors are entirely unpredictable" - Digital Equipment