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,5bcc293dc5642650 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.21.229 with SMTP id y5mr24370121pbe.1.1318838352247; Mon, 17 Oct 2011 00:59:12 -0700 (PDT) Path: d5ni20581pbc.0!nntp.google.com!news2.google.com!goblin3!goblin1!goblin.stu.neva.ru!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Why no Ada.Wide_Directories? Date: Mon, 17 Oct 2011 09:59:37 +0200 Organization: cbb software GmbH Message-ID: <4j9sogywhu37.99zyvbiqma79.dlg@40tude.net> References: <9937871.172.1318575525468.JavaMail.geo-discussion-forums@prib32> <418b8140-fafb-442f-b91c-e22cc47f8adb@y22g2000pri.googlegroups.com> <1gzuyf8eg0o0k.7yo8q1lqfiyr.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news2.google.com comp.lang.ada:13999 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-10-17T09:59:37+02:00 List-Id: On Sun, 16 Oct 2011 20:15:11 -0400, Peter C. Chapin wrote: > In order to talk sensibly about files the standard needs to define a > model of "file" and, in this case even "file system." This needs to be a > model that will be applicable to the widest range of platforms possible. Right > Such is the nature of a standard. Thank you for making my point. The standard disregards the above principle by using Latin-1 encoding for file names. > Thus the standard model of "file" and > "file system" will be a simplified abstraction of the real thing on any > particular system. "Simplified" is in contradiction with "widest range". In order to support widest range it must generalized, abstracted, rather than simplified, degraded. Ada adopted Unicode. Unicode is a generalized model capable to handle any encoding the target platform might use. The programmer need not to know the actual encoding, it becomes irrelevant. > If other files on the system also conform to that simplified model, that > is good. A portable program will be able to manipulate them. However, if > a program wishes to manipulate all files on a particular system, with > their full generality, system-specific techniques are going to be necessary. Wrong. All file systems share common features, which can and must be properly abstracted. System-specific are the implementations, not the package specifications. > For example, I don't believe the Ada standard allows one to access > information about a file's owner. This has nothing to do with file names, but if the standard wished to address access rights, it could do it as well. > Yet every file on my Linux system has > an owner. If I want to write a portable Ada program I have to live > without that information. If the Ada standard goes on to say that I > can't access files with names containing "exotic" characters, how is > that any different in principle? Because inability to spell the file name is not same as lacking access rights. Access rights are external to the program code. The file name, coded as a string literal is a part of the program. Failure of the former is not a bug. The latter is a bug, because the file exists, is accessible and has proper name. A program bug which cannot be fixed is a language design bug. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de