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,4f316de357ae35e9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-05 06:31:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: FAQ and string functions Date: 05 Aug 2002 09:24:04 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <20020730093206.A8550@videoproject.kiev.ua> <4519e058.0207300548.15eeb65c@posting.google.com> <20020731104643.C1083@videoproject.kiev.ua> <4519e058.0208010629.5e6182ca@posting.google.com> <20020801194720.Q1080@videoproject.kiev.ua> <4519e058.0208020605.5ab7e092@posting.google.com> <3D4AAF63.72782659@san.rr.com> <3D4B2382.7030209@telepath.com> <3D4B2ACD.FDA29B9A@san.rr.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1028554357 10081 128.183.220.71 (5 Aug 2002 13:32:37 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 5 Aug 2002 13:32:37 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:27699 Date: 2002-08-05T13:32:37+00:00 List-Id: Darren New writes: > Sure. I think the problem is that there's a host of low-efficiency > operations in Perl that take advantage of built-in data structures. That Ada > offers fixed strings, bounded strings, and unbounded strings indicates that > it has a focus on efficiency that something like Perl doesn't. If Ada didn't > have unbounded strings, people would have to keep reimplementing it. Ada > doesn't have unbounded arrays, and people have to keep reimplementing that > (when they need it). The assign-to-a-local-in-a-declaration doesn't really > work well when you have long-lived arrays. Sounds like a good component for Grace. > I've been working in scripting languages for the last few years, and > I see a lack in Ada of basic simple data structures, like variable > sized arrays, content-addressable arrays, and a few other things > like that. I can see how someone coming from Perl could miss all > that. Once you've written programs using built-in hashtables, > arrays, etc, it's difficult to look at a language that doesn't use > such things and see how to do simple things. And that it isn't built > in means it's not going to get used everywhere it should. Even if > you build a library for UnboundedArrays, the (pulls example out of > left ear) MIME-parsing library isn't going to return an > UnboundedArray compatible with the one that goes into the XML > parser. The MIME library's output strings might be > Ada.Strings.Unbounded, and the XML parser's input strings might be > Ada.Strings.Unbounded, but if you want to pass the array of lines > that's the body of the message into the array of lines that's the > XML parser's input, you're going to need to do conversions. Unless they all use Grace components. That's the point; Perl has a _standard_ library for doing unbounded arrays. Ada needs one. Let's write it! > Yes, you *could* build all that. But from a "newbie" point of view, > having multitasking with extensive typing and all that, but lacking > something as simple as a variable-length array, really slows down > learning the language, because you're constantly stumbling when > you're trying to do *simple* stuff. I think we need to distinguish between the "language" and the "library". I realize languages like Perl and Java deliberately try to confuse the two, but we don't have to buy into that. > Of course, Ada has excellent numeric support, type support, > multithreading, etc etc etc. It also looks like the support for > large-scale programming is excellent, altho I haven't had a chance > to test that out. > > -- > Darren New > San Diego, CA, USA (PST). Cryptokeys on demand. > ** http://images.fbrtech.com/dnew/ ** > > They looked up at me like I was a slab of beef > walking into an all-you-can-eat seafood buffet. -- -- Stephe