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: 146b77,d275ffeffdf83655 X-Google-Attributes: gid146b77,public X-Google-Thread: 103376,d275ffeffdf83655 X-Google-Attributes: gid103376,public X-Google-Thread: f5d71,d275ffeffdf83655 X-Google-Attributes: gidf5d71,public X-Google-Thread: 109fba,d275ffeffdf83655 X-Google-Attributes: gid109fba,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Ada vs C++ vs Java Date: 1999/02/08 Message-ID: #1/1 X-Deja-AN: 442067890 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> <79fm3e$ffs$1@nnrp1.dejanews.com> Organization: The Mitre Corp., Bedford, MA. Newsgroups: comp.lang.ada,comp.lang.c++,comp.vxworks,comp.lang.java Date: 1999-02-08T00:00:00+00:00 List-Id: In article Ole-Hjalmar Kristensen writes: > Yes. And from this I infer that you think that any standardization of > libraries, or even built-in functions are a waste of time? I don't remember Robert Dewar objecting to any of the package heavy annexes during the standardization of Ada 95, so I think you are misunderstanding what he is saying... > No, the point is that C++ has recently take a major step forward with > the acceptance of a standard library which is rather comprehensive and > has a sound foundation. Arguing that this is not needed in Ada is not > going to convince anyone to use Ada. Let me turn your argument around, and go back almost ten years, to the start of the Ada 9X effort. I think it was pretty well accepted at that time that some packages should be standardized separate from the Ada language, and that some belonged in the standard. The standard math library for Ada 83 was a separate library, and at that time adding it to the Reference Manual was a subject of discussion. The final outcome not only included the elementary functions in the required libraries, but added complex elementary functions to the specialized annexes. I think that this is definitely the way to proceed with a set of class libraries for Ada. We are getting to the point where it will make sense to create several standard class libraries, starting with a container library. Now a word about the c++ code example that started this discussion. I've written similar programs in Ada of similar size, mostly to test sort packages. So why hasn't anyone posted such an example to the list? I'll tell you why I haven't. There are no specified requirements provided, and trying to write a specification for which that code is in some sense the "right" solution turns out to be almost impossible. If I was to solve the apparent problem, I'd use Ada.Strings.Unbounded and an AVL tree package. Read the input into the tree, then read it out inorder. I have several container libraries to choose from, and the actual program amounts to instantiating the tree type for unbounded strings, then two three line loops, one to read the input, and one to write it out again. So it is easy enough to WRITE in Ada, and easy to read and understand as well. It is just that there are a number of questions I'd send back to the requestor before handing over the code: Are there any concurrency requirements? In particular, what are the requirements, if any, for reading from a pipe or a terminal? Is the input format limited such that Ada.Strings.Bounded may be used for better efficiency? What are valid characters in the input, and what characters have special treatment requirements. (In particular for C++ compatibility, do I have to treat NUL specially?) Is the input small enough that I can sort in memory on the intended target? If not, can I keep the index/tree in memory while writing the data to disk? -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...