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 autolearn=no 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: 109fba,d275ffeffdf83655 X-Google-Attributes: gid109fba,public X-Google-Thread: 101b33,d275ffeffdf83655 X-Google-Attributes: gid101b33,public X-Google-Thread: 115aec,d275ffeffdf83655 X-Google-Attributes: gid115aec,public X-Google-Thread: 1108a1,d275ffeffdf83655 X-Google-Attributes: gid1108a1,public X-Google-Thread: f5d71,d275ffeffdf83655 X-Google-Attributes: gidf5d71,public X-Google-Thread: 103376,d275ffeffdf83655 X-Google-Attributes: gid103376,public X-Google-Thread: 146b77,d275ffeffdf83655 X-Google-Attributes: gid146b77,public From: Mike Coffin Subject: Re: Ada vs C++ vs Java Date: 1999/01/17 Message-ID: <8p6yan1xger.fsf@Eng.Sun.COM>#1/1 X-Deja-AN: 433894191 References: <369C1F31.AE5AF7EF@concentric.net> <369DDDC3.FDE09999@sea.ericsson.se> <369e309a.32671759@news.demon.co.uk> <77ledn$eu7$1@remarQ.com> <77pnqc$cgi$1@newnews.global.net.uk> <8p64spq5lo5.fsf@Eng.Sun.COM> <8p6vhi5mv34.fsf@Eng.Sun.COM> Organization: Sun Microsystems Inc., Mountain View, CA 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-17T00:00:00+00:00 List-Id: Matthew Heaney writes: > I am interested in specifics. List 5 specific language features by > which you conclude Ada is "complex." I'll have to answer based on Classic Ada; I haven't had occasion to look seriously at the latest version. Here are some broad areas that I think are way too complicated: 1. Generics. Ada generics are much more complicated and harder to use than need be. If you insist on complete run-time type checking, ML's type system is easier to use and more powerful. (I don't blame Ada for this: Hindley-Milner-style type systems probably didn't exist and certainly weren't widely known.) I know that there were some efforts to get some type-inference technology into Ada Mark II or whatever it's called, but I don't know if any succeeded. On the other hand, if you're of the opinion that exceptions do happen, and that type exceptions are just another kind of exception, OO type systems such as Java and Smalltalk are a *lot* simpler than Ada's. 2. Rendezvous. Compare accept/select/when, with all their permutations and ramifications, with SR's "in" statement which is much more powerful. (This is chiefly because "when" clauses can't reference entry parameters in Ada). In fact, compare all of Ada's interprocess communication with SR's. SR's is much more powerful and easier to use. (But I'm biased; I worked on SR back when the world was new :-) 3. Treatment of variables shared between tasks. Task A changes a variable. When does task B see the change? Trying to maintain too much generality made Ada much more complicated than any language I can think of in this regard. It's not so much that the language rules are complex, it's that writing programs that work reasonably given then weak language rules is so hard. Anyone know of another language that tries to conflate shared-memory and distributed programming? 4. Parameter passing. Three modes; named parameters; default values (but not for in-out parameters, for some reason). In spite of all the features, the behavior is mostly unspecified for arrays and records. Compare with rules of C, Java, or almost any other language: they lack *all* these nifty features and seem to get along fine. C++ of course being the exception. 5. Overloading. Do result types matter? Do parameter names matter? Do default values matter? Why, or why not? And, hey: parameterless subroutines and enumeration literals look sort of the same. Can they overload each other? Can they hide each other? If so, when and where? It could be worse though, as C++ demonstrates. Next time I make a joke I'll make it about something that people don't take so damn seriously. Death, famine, or nuclear winter maybe. :-) -mike