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-Thread: 103376,6bf1c4b845bd2160 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!87.79.20.105.MISMATCH!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 02 Sep 2010 22:48:22 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: What about a glob standard method in Ada.Command_Line ? References: <4c73fcf6$0$6992$9b4e6d93@newsspool4.arcor-online.net> <1jxm50y65grlo.sjyb9hm4y1xp$.dlg@40tude.net> <4c743a59$0$6893$9b4e6d93@newsspool2.arcor-online.net> <4c74db09$0$6890$9b4e6d93@newsspool2.arcor-online.net> <1r82cxcws3pc9$.r40m8l3ttil7$.dlg@40tude.net> <4c74f9f6$0$6772$9b4e6d93@newsspool3.arcor-online.net> <17drl4b1ko4iv.1eccfudluzl5h.dlg@40tude.net> <4c7515fc$0$7664$9b4e6d93@newsspool1.arcor-online.net> <4c752693$0$7656$9b4e6d93@newsspool1.arcor-online.net> <17uj112bzfc47$.1jlqotsp6zuup.dlg@40tude.net> <4c753c0c$0$6877$9b4e6d93@newsspool2.arcor-online.net> <4c756481$0$6775$9b4e6d93@newsspool3.arcor-online.net> <4c75bc6d$0$6973$9b4e6d93@newsspool4.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4c800d96$0$7659$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 02 Sep 2010 22:48:23 CEST NNTP-Posting-Host: f0e44c7d.newsspool1.arcor-online.net X-Trace: DXC=L@h3b]69S^`f1oJaJ0@dmgic==]BZ:afn4Fo<]lROoRa<`=YMgDjhgbkkVBCm`oO1jPCY\c7>ejVhlLCo8g\EjfkAeHSS^AP6Td X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:13921 Date: 2010-09-02T22:48:23+02:00 List-Id: On 9/2/10 9:08 PM, Randy Brukardt wrote: >> 2. do with the names what I want after they have been read: > > Why is such a Matcher routine necessary? Not really, my overloaded subp was a quick attempt at removing implementation-defined and replacing it with something that allows all kinds of control over the results, i.e. the next file name is good or not. The callback should just place the file name testing loop inside (Start_)Search, as a way to keep the directory searching loop free from the matching stuff (like Pattern, only with more power). OTOH, much of my argument in favor of full power String matching is based on the (presumed) fact that file system names are basically like vegetables. There will be specks, some rotten, and molds, as mentioned. But you still want to eat them, without exception, when you are hungry and they represent the notion of edible food.[*] That leaves the question why having implementation- defined stuff isn't called for anyway. (Any I rarely hope for the bits returned by the files system routines to always permit 1:1 mappings to Unicode character sequences in whatever representation. ) File systems capable of optimizing directory scanning when they know part or the file name add to an argument in favor of implementation defined. So for me, the heated discussion boils down to a callback (or generic formal function) that might or might not express a file name filter well---one nesting level less if you compare it to a loop with a filtering conditional in it. Georg [*] http://www.fsis.usda.gov/factsheets/molds_on_food/#2