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: 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 X-Google-Thread: 109fba,d275ffeffdf83655 X-Google-Attributes: gid109fba,public From: "James S. Rogers" Subject: Re: Ada vs C++ vs Java Date: 1999/02/07 Message-ID: <79kd5j$q5r@bgtnsc01.worldnet.att.net>#1/1 X-Deja-AN: 441686248 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> <77t3ld$nou$1@nnrp1.dejanews.com> <79ce4s$lfq$1@nnrp1.dejanews.com> <79chc7$ko6@drn.newsguy.com> <79dodb$rhf$1@nnrp1.dejanews.com> <79jeos$bu4@bgtnsc01.worldnet.att.net> <79k65l$s0t@drn.newsguy.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: AT&T WorldNet Services Newsgroups: comp.lang.ada,comp.lang.c++,comp.vxworks,comp.lang.java Date: 1999-02-07T00:00:00+00:00 List-Id: mike wrote in message <79k65l$s0t@drn.newsguy.com>... >This is really a question of "should a langauge have a build-in support for >threads or not" . This is not a question of libraries. > >This question has been debated many times, and if the only argument you >have for Ada over C++ is this, then this is a weak argument, (Java have >build-in support for threads, plus much more rich standard library than >Ada). Java thread support is actually quite weak compared to that in Ada. C++ thread support does not exist. > >It is not clear which is better to have a build-in support in the language >for threads or using an external STANDARD threads library instead. > >nowadays posix pthreads IS standard. With the pthreads library you can >build anything you can build with Ada tasks and more (Ada tasks actually are >implemented using pthreads on such platforms). What do you do when your operating system does not support posix threads? What do you do when your program runs on a bare microcontroller with no operating system at all? Posix threads libraries are of no use at all in these cases. Support for posix threads only is much like support for abstract data types. You can build all the queues, bags, lists, etc. in any language with support for abstract data types. As you have said before, this is not the same as having standard solutions for the higher level abstractions. Saying high level support for tasking does not count, while high level support for abstract data types does count is carrying a double standard. It appears to me that you are saying "If my favorite language supports the feature, then it is important. If my favorite language does not support the feature, then the feature is not important." This discussion will get nowhere if this is your attitude. >>Ada gives me all of this as part of the basic language. I do not even >>need to call libraries to have tasking or protected types. >> > >I does not matter. pthreads is standard, calling it from your program is >not much different from using a language build-in task. you simply >add pthreads library to you Makefile and that is it. It is no big deal. > >I agree that Ada tasks and things like protected types make life a little >easier since it is a higher level abstraction than using pthreads >directly, but someone who knows pthreads well, can build these >abstraction using pthreads also (as in threads C++ classes which acts >as higher level wrappers around pthreads), a little more work, yes, but >it is not hard to use pthreads anyway, it is a very flexible API, and you >get the primitives that you can build any model you want from. > >The point is, at the end of the day, it comes back to how extensive and usefull >is the standard library is. In Ada, it is not, with C++ and Java, the >standard library is much more advanced. GNAT for example is doing something >good by adding standard GNAT packages as part of GNAT such as that pattern >matching package. Much more of this is needed. Then we can talk real business. This gets to the real point of the discussion. "How useful and extensive is the standard library?" Usefulness is, like beauty, in the eyes of the beholder. In my work the C++ standard library is of no use. On the other hand, the Ada high level support for tasking, and the Ada standard library, are extremely useful. It appears to be otherwise for you. This situation is to be expected. How does a language standardization team decide what to put into a standard library, and what to exclude? It must be based upon the experiences of the standardization team. Those experiences are founded upon the kinds of problems the team has most experience solving with software. The C++ team clearly has a different background than the Ada team. Does this make one team more correct than the other. I do not think so. Does this, therefore, make one language more correct than the other. The answer must be NO. It is human nature to want all things to be familiar. The natural extension of that in computer languages is that we tend to want all languages to be like the language we use most. If one language were really the best solution for all problems, then there would only be a small set of computer languages. The fact that there are hundreds of computer lanuages indicates that no single language is best for all problems. > >mike Jim Rogers Colorado Springs, Colorado