comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: What about a glob standard method in Ada.Command_Line ?
Date: Thu, 2 Sep 2010 14:08:47 -0500
Date: 2010-09-02T14:08:47-05:00	[thread overview]
Message-ID: <i5oso1$bqi$1@munin.nbi.dk> (raw)
In-Reply-To: 4c75bc6d$0$6973$9b4e6d93@newsspool4.arcor-online.net

"Georg Bauhaus" <rm-host.bauhaus@maps.futureapps.de> wrote in message 
news:4c75bc6d$0$6973$9b4e6d93@newsspool4.arcor-online.net...
...
> You said, "You just do not need patterns in directory search."
> Did this refer to the Pattern : String parameter of
> (Start_)Search?   If so, I fully agree.
>
> Here is what I wanted Matcher : access function (...) to be.
>
> 1. get rid of implementation-defined Pattern : String

It's not implementation-defined if it is null; that is defined to match 
everything (always).

I'm not sure why we didn't give it a null string default (that seems like 
the logical thing to have done, since you often want to return everything). 
(I thought we had given it such a default, but that is definitely not the 
case.)

> 2. do with the names what I want after they have been read:

Why is such a Matcher routine necessary? You might as well just test the 
file name returned; there is going to be more overhead in the callback 
routine than in a direct test, and there is no way for the OS to help.

The reason there is an implementation-defined pattern parameter is that some 
OSes (Windows, for instance) can take the pattern directly and only return 
matches -- in this case, the Ada runtime can potentially be more efficient 
than writing the code explicitly. If the code has to be written explicitly, 
it might as well be part of the user program. There wasn't any intent to 
support anything here that the OS doesn't support directly (on POSIX 
systems, it would make sense to only support the null string pattern, 
although I think actual implementations do more). Programs that want to be 
as portable as possible ought to only use Pattern => "" in Start_Search.

                                Randy.








  parent reply	other threads:[~2010-09-02 19:08 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-21  4:47 What about a glob standard method in Ada.Command_Line ? Yannick Duchêne (Hibou57)
2010-08-21  6:41 ` J-P. Rosen
2010-08-21  7:21   ` Yannick Duchêne (Hibou57)
2010-08-21  9:11   ` Pascal Obry
2010-08-22 19:00     ` J-P. Rosen
2010-08-22 19:29       ` Yannick Duchêne (Hibou57)
2010-08-23 23:06       ` Randy Brukardt
2010-08-24  0:02         ` Yannick Duchêne (Hibou57)
2010-08-24  0:24           ` Adam Beneschan
2010-08-24 10:27             ` Georg Bauhaus
2010-08-24 14:24               ` Dmitry A. Kazakov
2010-08-24 15:42                 ` Georg Bauhaus
2010-08-24 16:04                   ` Dmitry A. Kazakov
2010-08-24 17:10                     ` Georg Bauhaus
2010-08-24 17:24                       ` Georg Bauhaus
2010-08-24 18:42                         ` Yannick Duchêne (Hibou57)
2010-08-24 18:51                           ` Simon Wright
2010-08-24 17:41                       ` Dmitry A. Kazakov
2010-08-24 21:32                         ` Georg Bauhaus
2010-08-25  7:55                           ` Dmitry A. Kazakov
2010-08-25  8:24                             ` Yannick Duchêne (Hibou57)
2010-08-25 20:15                               ` (see below)
2010-08-25 20:39                                 ` Yannick Duchêne (Hibou57)
2010-08-25 21:05                                   ` (see below)
2010-08-25 21:32                                     ` Yannick Duchêne (Hibou57)
2010-08-25  8:57                             ` Georg Bauhaus
2010-08-25  9:28                               ` Dmitry A. Kazakov
2010-08-25 11:09                                 ` Georg Bauhaus
2010-08-25 12:01                                   ` Dmitry A. Kazakov
2010-08-25 13:09                                     ` Georg Bauhaus
2010-08-25 13:30                                       ` Dmitry A. Kazakov
2010-08-25 14:20                                         ` Georg Bauhaus
2010-08-25 14:56                                           ` Dmitry A. Kazakov
2010-08-25 15:51                                             ` Georg Bauhaus
2010-08-25 16:46                                               ` Dmitry A. Kazakov
2010-08-25 18:44                                                 ` Georg Bauhaus
2010-08-25 19:39                                                   ` Dmitry A. Kazakov
2010-08-26  0:59                                                     ` Georg Bauhaus
2010-08-26  8:49                                                       ` Dmitry A. Kazakov
2010-09-02 19:25                                                         ` Randy Brukardt
2010-09-02 20:47                                                           ` Dmitry A. Kazakov
2010-09-02 19:08                                                       ` Randy Brukardt [this message]
2010-09-02 20:48                                                         ` Georg Bauhaus
2010-08-22 19:30     ` Yannick Duchêne (Hibou57)
2010-08-22 19:46       ` Dmitry A. Kazakov
2010-08-25 13:09 ` anon
2010-08-25 13:13   ` Georg Bauhaus
2010-08-25 13:28     ` J-P. Rosen
2010-08-25 20:29       ` Yannick Duchêne (Hibou57)
2010-08-25 14:14     ` Jeffrey Carter
2010-08-25 21:37     ` anon
2010-08-26  8:21       ` J-P. Rosen
2010-08-26 16:29         ` anon
2010-08-26 20:34           ` Yannick Duchêne (Hibou57)
2010-08-27  4:40             ` Yannick Duchêne (Hibou57)
2010-08-27 12:10           ` J-P. Rosen
2010-09-01  8:08             ` Ada compilers and Ada 2005 (was: What about a glob standard method in Ada.Command_Line ?) Georg Bauhaus
2010-09-01  9:45               ` Ada compilers and Ada 2005 Pascal Obry
2010-09-01 10:28                 ` J-P. Rosen
2010-09-02 19:37                   ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox