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.31.73 with SMTP id y9mr10404697pbh.0.1319096257309; Thu, 20 Oct 2011 00:37:37 -0700 (PDT) Path: d5ni34949pbc.0!nntp.google.com!news1.google.com!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: Thu, 20 Oct 2011 09:37:57 +0200 Organization: cbb software GmbH Message-ID: References: <9937871.172.1318575525468.JavaMail.geo-discussion-forums@prib32> <418b8140-fafb-442f-b91c-e22cc47f8adb@y22g2000pri.googlegroups.com> <7156122c-b63f-487e-ad1b-0edcc6694a7a@u10g2000prl.googlegroups.com> <409c81ab-bd54-493b-beb4-a0cca99ec306@p27g2000prp.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 Xref: news1.google.com comp.lang.ada:18615 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-10-20T09:37:57+02:00 List-Id: On Wed, 19 Oct 2011 16:43:08 -0500, Randy Brukardt wrote: > The only way to safely use a UTF-8 string is opaquely, which means you can > store it whole, but any operation on it is performed after decoding it. > That's of course the best argument for having it be a separate type. Yes. It is worth to remember that Ada once was considered a strongly typed language... > The > problem is that Ada doesn't have any reasonable way to define conversions > for that type (and having long-winded conversion functions with long winded > names like "Ada.Strings.Unbounded.To_Unbounded_String" don't count in my > view). This is a language type system problem, which must be fixed first. > And there is just enough need to treat these things as > arrays-of-bytes (slicing is needed for storage of variable length UTF-8 > strings in "plain Ada", for one example) that treating them as "opaque" > isn't ideal. That is an unrelated issue. Once the type system gets fixed, it would be no problem to have an array view (or fancy "aspect", if you want) of encoded strings. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de