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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e219d94b946dfc26 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!newsfeed01.chello.at!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada.Command_Line and wildcards Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> <45E1B7AA.30804@obry.net> <1dpvltpykld8r$.1rn2ewhc0itjt$.dlg@40tude.net> <1172587938.237094.134530@m58g2000cwm.googlegroups.com> Date: Tue, 27 Feb 2007 21:56:31 +0100 Message-ID: <13x0ov607spkz$.ix9loa809cqb$.dlg@40tude.net> NNTP-Posting-Date: 27 Feb 2007 21:56:24 CET NNTP-Posting-Host: f884e7c1.newsspool4.arcor-online.net X-Trace: DXC=k:E62Zigln;85[]]\]T0814IUK?DNcfSJ;bb[5IRnRBaCd6XcB=^;hF@8AH_3W>7AZ<< X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:9584 Date: 2007-02-27T21:56:24+01:00 List-Id: On 27 Feb 2007 06:52:18 -0800, Hyman Rosen wrote: > On Feb 26, 7:34 pm, "Randy Brukardt" wrote: >> The problem is that if it doesn't fit, you can't recover > > Granted, but that's not really the point. On a modern computer system, > given that it's reading input from a file or standard input, the > programmer can reasonably expect that there are at least many tens of > megabytes available to be allocated. Sure there can be inputs that > will exceed that, but then you're really in a different domain. > > Think of it this way - when you decide to sort data, you need to > choose between internal and external sorts. You can't do that without > a notion of a threshold size. Clearly that size has increased over the > years. Reading input is similar. Many programs can now very reasonably > expect to read in their entire input into memory at once before > processing any of it, and if that's not going to work because of > allocation on the stack then there should be an alternative. But Pascal's point still apply here. The size you are talking about, is it just a programmer's expectation or a fact derived from the domain? This nice-looking feature could provoke false expectations resulting in poorly designed programs. I am undecided here. P.S. Reading files into memory is a plague of modern programs. I remember a problem of reading 3-4GB log file under Windows. Most of editors just crashed after 20 minutes of hard work. And those rare who survived blocked UI until reading the file to the end. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de