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,ac4955b8006bd13c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.219.170 with SMTP id pp10mr10046771pbc.1.1338800998971; Mon, 04 Jun 2012 02:09:58 -0700 (PDT) Path: l9ni18707pbj.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Q: type ... is new String Date: Mon, 4 Jun 2012 11:09:43 +0200 Organization: cbb software GmbH Message-ID: References: <336f4e4b-16da-4fa8-9b7a-7e2dd3a48018@w24g2000vby.googlegroups.com> 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 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: 2012-06-04T11:09:43+02:00 List-Id: On Mon, 04 Jun 2012 10:14:55 +0200, Yannick Duch�ne (Hibou57) wrote: > A path is intently a string is all platform I know, RSX-11 had path of two letter device, two numbers of the directory, RADIX-50 encoded file name, extension and numeric version. E.g. DX:[1,54]HELLO.ADA;4. Neither part of this was ASCII string. And path weren't stored anywhere if "internally" meant "kept on the magnetic carrier." > A string and a file's path belongs to the same class. I prefer separate types for path, device, file name, for absolute and relative paths. A common class with strings may be present per conversions between strings and paths. E.g. a path with non-Latin1 letters to String would raise Constraint_Error. However, if typed properly, you better have no implicit conversions to strings at all. If you look into it, strings are actually used as a middleman for rendering, I/O etc. A comprehensive design may need no such thing. E.g. you would write paths directly to a text file and read them from there back as you do with numbers. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de