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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f849b,d275ffeffdf83655 X-Google-Attributes: gidf849b,public X-Google-Thread: f5d71,d275ffeffdf83655 X-Google-Attributes: gidf5d71,public X-Google-Thread: 115aec,d275ffeffdf83655 X-Google-Attributes: gid115aec,public X-Google-Thread: 101b33,d275ffeffdf83655 X-Google-Attributes: gid101b33,public X-Google-Thread: 103376,d275ffeffdf83655 X-Google-Attributes: gid103376,public X-Google-Thread: 146b77,d275ffeffdf83655 X-Google-Attributes: gid146b77,public X-Google-Thread: 109fba,d275ffeffdf83655 X-Google-Attributes: gid109fba,public X-Google-Thread: 1108a1,d275ffeffdf83655 X-Google-Attributes: gid1108a1,public From: Ralph Cook Subject: Re: Ada vs C++ vs Java Date: 1999/01/13 Message-ID: <369CF85A.B108ACA8@pobox.com> X-Deja-AN: 432245636 Content-Transfer-Encoding: 7bit References: <369C1F31.AE5AF7EF@concentric.net> Content-Type: text/plain; charset=us-ascii Organization: Ericsson, Inc. Mime-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.c++,comp.vxworks,comp.lang.java,comp.java.advocacy,comp.realtime,comp.arch.embedded,comp.object,comp.lang.java.programmer Date: 1999-01-13T00:00:00+00:00 List-Id: Erik Funkenbusch wrote: > It's not a very cut and dried situation i'm afraid. > > (comments below) > > Leszek Sczaniecki wrote in message > news:369C1F31.AE5AF7EF@concentric.net... > >We are about to start a big project, something about 250k lines of code. > >We are going to stick to it for next several years. We would like to > >make an educated choice for the underlying language. This language > >should > > I don't think size of the project has much influence over the choice when > considering language. At least not in the languages you've mentioned. > > >- support object oriented programming > > All three do, although at differing levels and differing feature sets > (example: Java doesn't support Multiple Inheritance, C++ does. But that > may not be a concern to you). > > >- support parallel programming > > I'm not sure exactly what you mean by that. You mean multi-processor > support? Threads? Those are OS constructs, but of course the Language has > to be able to handle them (VB for instance doesn't do a good job of that). I like Java's standard constructs for threads, if that meets your case. > >- lead to easily maintainable code > > No language will do that. It's a function of design. hear, hear. > >- promote safe programming techniques > > Be aware that "safe" often means "confining". You may not be able to do the > things you need to do in a language that doesn't support pointers or direct > hardware access (like Java). see "easily maintainable code". Safe programming techniques are not a language choice issue, though I find pointer use in C and C++ to be very error-prone. > >- have significant support from commercial vendors (compilers, GUI > >design, testing sw) > > Well, Java is gaining a lot of vendor support. But be aware that the > language is changing rapidly and that there is no standardization of it. This is a lie. Sun has been criticized for controlling its standardization too much. The language has evolved, so that versions 1.0, 1.1, and 1.2 are more different than similar version numbers of, say, a compiler for an already defined language. But there IS a standard, regardless of what MS thinks. > New versions are likely to make older code obsolete (for instance, the > switch from 1.0.x to 1.1 introduced whole new event models). It's a very > immature language and is likely to go through a lot more growing pains. Your bias against Java is obvious: let me restate this in a less negative way. The language has gone through many changes; how many it has to go through yet before being considered "mature" is a matter of opinion. I think, myself, that the parts of the it they didn't get quite right in the first place are mostly reworked satisfactorily now, and that growth and change will slow down greatly. Others (obviously) think differently on the subject. Be sure, in your research on Java, to differentiate between the net and browser world (much of which is just now converting to 1.1) and those people without the installed browser base that are (more) free to use Java's current version. > >- be available for popular processors (such as 68xxx, PowerPC, etc.) > > Processors aren't the key, OS platforms are. You're most safe with C++ on > this matter i think. Java isn't available on everything yet. You're also > likely to find limited choices in ADA compilers on more obscure OS's. Well, look at WHAT processors and OSs you want to run, and then what languages are available for them. There is also the matter of compatiblity; Java programs are object-code-compatible across processors. You don't say whether you want to run on different platforms with the same version of your code. > >- support "almost real time" execution > > Well, Java certainly can't do this yet. C++ can, depending on OS support. > ADA most certainly does, or it wouldn't be able to be used in Jet Avionics > and such. Unfortunately, the phrase is meaningless, so we can't say what languages can and cannot do this (on what processors and OSs, again). Real-time means a lot of things, but really what somebody needs is "fast enough". Whether you're doing human genome mapping or GUI interaction makes a lot of difference. Don't get caught in the trap of thinking faster is always better unless you really need all the speed you can get -- there are VERY few applications/systems like that (and FORTRAN still has C, C++, and Java all beat in this regard). > >- be suitable for design of embedded systems > > C++ generally isn't. There is an "embedded C++" that's in the works, and > there might even be some implementations. C is better for embedded work > than C++. I don't know the specifics of ADA embedded work. And Java can work well in many embedded environments, and has definitions of EmbeddedJava and PersonalJava for the purpose. I note that the original responder doesn't mention this... > >There is a legacy code written in Ada and our customer would prefer Ada > >95. However, we became seriously concerned that there is not sufficient > >support for Ada in the commercial world. > > Well, there seems to be plenty of vendor support for ADA, but I think you > won't find as much 3rd party library support. That means you'll be stuck > writing everything from scratch in most cases. > > >Given, that we will be stuck > >with our project for the next several years we would like to choose > >something that still will have adequate support few years down the road. > >Given all that we decided to check C++ and Java. I would appreciate > >greatly any comparisons, comments, hints, pointers to electronic and > >hard copy sources, warnings about traps and pitfalls, etc. that would > >help us thoroughly justify the language choice to our customer. > > Well, I would vote against Java. It's too immature for a long term project > and has questionable speed. And I would vote for Java; you need to figure out if there is enough speed (for your environments and applications) *regardless* of your language. The runtime environment is far easier to debug, and the language itself is more strictly OO, without the baggage of C compatibility. I find Java's changes to be less of a problem than things about C++ that will not change. > Your choice of ADA and C++ has many factors. It's likely going to be easier > to find people to maintain C++ code than ADA. It's also got more 3rd party > support. Both are standardized, although not all current compilers support > the full standard C++ yet (in fact, I don't know of any that are fully > compliant yet). Isn't it wonderful to have a standard that no one supports? What does that mean? And there *is* a java standard; go and get the books from Barnes & Noble if you want. Again, the previous poster seems to have given up on Java. I would expect people familiar with Java to be more numerous than for Ada, but I don't have numbers and don't really know. Actually, I'd try to hire good programmers and have them use whatever language got chosen; good programmers are harder to find than people who know the tricks of one language. rc -- When I do speak for my company, I list my title and use "we".