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: 103376,f868292008c639ce X-Google-Attributes: gid103376,public From: "Marin D. Condic" Subject: Re: Java vs. Ada - strings (was: C vs. Ada - strings) Date: 2000/06/06 Message-ID: <393CF26E.84280755@quadruscorp.com>#1/1 X-Deja-AN: 631697235 Content-Transfer-Encoding: 7bit References: <390F0D93.F835FAD9@ftw.rsc.raytheon.com> <8en5o9$ihe$1@nnrp1.deja.com> <8eonos$e70$1@wanadoo.fr> <1fIU4.4668$Rx3.250161@typhoon.nyroc.rr.com> <3924B730.AFB52C1C@acenet.com.au> <39394E0B.75BD479C@telepath.com> <8hgb3m$bs$1@nnrp1.deja.com> <62Z_4.4847$Md1.208151@news.flash.net> Organization: Quadrus Corporation X-Sender: "Marin D. Condic" (Unverified) X-Server-Date: 6 Jun 2000 12:48:32 GMT Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-06-06T12:48:32+00:00 List-Id: Ken Garlington wrote: > > That doesn't seem very fair... how about testing the thesis with a nice, > non-language-specific requirement? For example: "Create a list of the names > of the people who participated in this thread." I hope that "list" is > reasonably well-defined as to its methods, etc. (delete an item on the list, > replace an existing item, add an item to the end of the list, select a > specific item by its location in the list). What would that look like in > Java and Ada, and what are the advantages/disadvantages of each? I could > certainly seeing a ragged string array (in any language) as a reasonable > approach to addressing this requirement... That's a fair enough point. From my perspective, I'd utilize unbounded strings for the names because speed isn't a concern and its just generally easier to use unbounded strings. Keeping an array of pointers to unbounded strings? Probably not. I'd use either a generic linked list package or derive the name retaining element from an OO list package. Of course, that's working from my own library of data structure code - not some sort of Ada standard library. A fair criticism would be that many data structures are available commonly for other languages within development environments even though these data structures are not part of the language. The fact that VC++ provides the MFC or Java has its class libraries sort of makes them a de facto part of the language and all the theoretical arguments in the world don't change the facts on the ground. It would serve Ada well to have a class library of data structures that is well documented and bundled with all of the major compilers. MDC -- ====================================================================== Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/ Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m Visit my web site at: http://www.mcondic.com/ "Some people think programming Windows is like nailing jello to the ceiling... easy with the right kind of nails." -- Ivor Horton - Beginning Visual C++ 6 ======================================================================