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-14 13:31:40 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: 14 Aug 2002 16:29:51 -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> <3D4B401E.3060802@telepath.com> <3D4B4477.500088B@san.rr.com> <3D4EA1AC.80D17170@s NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1029357540 7910 128.183.220.71 (14 Aug 2002 20:39:00 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 14 Aug 2002 20:39:00 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:28037 Date: 2002-08-14T20:39:00+00:00 List-Id: Robert A Duff writes: > "Randy Brukardt" writes: > > > I think your missing the Ada philosophy that something expensive should > > look expensive. An unbounded array (as you put it) is going to be > > expensive, and that expensive shouldn't be covered up in glossy syntax. > > IMHO, that philosophy is exactly the opposite of what high-level > languages are all about. The parts of Ada that disobey this philosophy > are the better parts. > > Here's an example: In Ada, one can write "A := B;". If they are > integers, it's fast. If they are gigantic arrays, it could be a million > times slower, or more. That's good -- assignment uses a single notation > no matter how fast or slow. Contrast with C, where copying arrays uses > a different syntax from copying ints. That's not a fair example. For assignment, the cost is clearly proportional to the size of the data, which is easily visible in the source. Hidden memory allocation is not clearly visible (because it's hidden :), but is expensive. A more valid example of hidden expense for assignment is a Controlled type; Finalize and Adjust could be expensive. But even there, the definition of the type clearly says "Controlled", so you are warned that it might be expensive. -- -- Stephe