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,6bf1c4b845bd2160 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!news.internetdienste.de!newsfeed.velia.net!news.tu-darmstadt.de!news.belwue.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: What about a glob standard method in Ada.Command_Line ? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4c739e76$0$6992$9b4e6d93@newsspool4.arcor-online.net> <152a2z5en4z2o$.xjsuqr7s8yak$.dlg@40tude.net> <4c73e859$0$6991$9b4e6d93@newsspool4.arcor-online.net> <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> Date: Wed, 25 Aug 2010 16:56:26 +0200 Message-ID: <17uj112bzfc47$.1jlqotsp6zuup.dlg@40tude.net> NNTP-Posting-Date: 25 Aug 2010 16:56:24 CEST NNTP-Posting-Host: 255afe27.newsspool1.arcor-online.net X-Trace: DXC=Lk@@BNQ9iT085[]]\]T081ic==]BZ:af>4Fo<]lROoR1<`=YMgDjhg2fcXS1NNXb[:[6LHn;2LCV>[n6MO On Wed, 25 Aug 2010 16:20:03 +0200, Georg Bauhaus wrote: > On 25.08.10 15:30, Dmitry A. Kazakov wrote: > >> If code points have nothing to do with String why do you propose to do it >> with String? > > Because file names as entities external to Ada have got nothing > to do with code points, from an Ada point of view: file names > have to do with Strings, though. This is in part a consequence > of how subprogram parameters in Directories.Start_Search were > chosen. Yes, that is the point: Ada.Directories is broken. > Conclusion: there cannot be a good, portable Ada type > representing file names. >From false premises follows anything. Certainly and without any doubt it is possible to provide an abstraction which would work for Posix, Unix, Windows, VMS, MacOS and name what OS. > Start_Search is based on String; file names do not obey > the rules of ISO 10646; no hope. As I said it is broken. Broken things to be repaired or disposed. Since the ARG cannot change OS they should look forward to change the RM. > From here, one can go on to a different type from the > collection that covers Unicode. I am one who uses "Ada String means UTF-8 encoded string". Surely this works. Since Ada.Directories is unusable, I deploy Glib bindings instead. At least they cared to define file paths UTF-8. But the approach is wrong because it mangles encoding and the contents. If I were to redesign Ada.Directories, I would use a clone type of Wide_Wide_String for file names. If Ada had array interfaces I would do it otherwise. But in any case file name would not be string, file path would not be a file name etc. >> It could >> represent some encoding of �*, which is the point. > > Exactly. And since there is no single, well defined, > portable � for file names, It is same as to say that there is no portable Integer type. Unicode code points are portable because they are defined so. If some name is not a valid file name you get Name_Error, likewise you get Constraint_Error if some integer is not valid number for the given machine. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de