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: 103376,8a3e2ce4e6d56336 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-09 19:16:06 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!arclight.uoregon.edu!wn4feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3AA99CDD.5F0FD0FF@worldnet.att.net> From: James Rogers X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Generic Formal Parameter for a Task Type References: <3AA80A68.A2C8B042@worldnet.att.net> <3AA84FC7.CE523E9D@worldnet.att.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 10 Mar 2001 03:15:46 GMT NNTP-Posting-Host: 12.74.156.61 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 984194146 12.74.156.61 (Sat, 10 Mar 2001 03:15:46 GMT) NNTP-Posting-Date: Sat, 10 Mar 2001 03:15:46 GMT Organization: AT&T Worldnet Xref: supernews.google.com comp.lang.ada:5595 Date: 2001-03-10T03:15:46+00:00 List-Id: I admit I misspoke about Java. I forgot the constructor problem in Java. My estimation of what is needed in Java is an extension of the Java Thread Group to allow a limit to the number of threads the group can contain. This is clearly a matter of inventing a new capability for Java, not simply a clever programming paradigm. You are correct in stating that Java has no generic capabilities. Java partly gets around it lack of generics because it has a common inheritance structure. All Java thread classes inherit from the class Thread. This means that a Java reference to a Thread object may reference any sublclass of Thread. Ada tasks are not part of an inheritance structure. It is possible to create a tagged type with one or more tasks as members of the type. This is not the same thing, although it can be used to partially simulate the Java situation. Jim Rogers Colorado Springs, Colorado USA Stephen Leake wrote: > > James Rogers writes: > > > > > > > > > Although this is easily done, it is not what I wanted. I had hoped > > to be able to create a generic package directly usable with most any > > task type. > > > > This appears to be one problem not solvable in Ada, yet easily > > solved in Java. > > Say what? Java has no notion of "generic package"! So what "problem" > are you solving in Java? > > If you change the problem statement to "create a class that can manage > tasks that are all derived from a common Object type", then that is > easily done in Ada! > > -- > -- Stephe