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 Received: by 10.68.8.199 with SMTP id t7mr276943pba.3.1319227376869; Fri, 21 Oct 2011 13:02:56 -0700 (PDT) Path: d5ni40696pbc.0!nntp.google.com!news1.google.com!goblin3!goblin1!goblin.stu.neva.ru!txtfeed2.tudelft.nl!tudelft.nl!txtfeed1.tudelft.nl!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: Fri, 21 Oct 2011 22:02:55 +0200 Organization: cbb software GmbH Message-ID: <1xuiads70kb6s$.odhmr2fg9b0z.dlg@40tude.net> 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> <4d97ced2-1695-4352-926c-2070f9ccbbf1@o19g2000vbk.googlegroups.com> <1cchjqhfjqo2l$.1s951jo0p9w8c.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: NkTZyZQzt+uRNthfI6+Hjg.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:18651 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: 2011-10-21T22:02:55+02:00 List-Id: On Fri, 21 Oct 2011 21:30:45 +0200, Yannick Duch�ne (Hibou57) wrote: > Le Fri, 21 Oct 2011 20:34:55 +0200, Dmitry A. Kazakov > a �crit: >>>> Not really. Wide_Wide_String is one possible implementation of logical >>>> Unicode string. >>> And precisely, that implementation is sufficient (*). >> >> Nope. Under Windows I rather need UTF-16 and ASCII. Under Linux it would >> be UTF-8 and RADIX-50 for RSX-11. > This is implementation. You wrote about the implementation being sufficient, which is evidently wrong. The interface = an array of code points indexed by some cardinal number is sufficient. The implementation = Wide_Wide_String is not. Ada does not allow you multiple implementations for this interface forming one class of types. Ada does not allow you constrained subtypes of the interface, e.g. narrower sets of code points (String), narrower ranges of the index (small embedded targets). Ada does not allow you alternative implementations like unbounded strings in the same class. This problem is a *fundamental* problem of the Ada type system. It must be addressed if the Ada wishes to stay a strongly typed language. >>> You can't expect Ada >>> will provide a so much abstract implementation that it will cover all >>> possible implementations. >> >> Why not? Why should not a language provide abstractions for character >> encoding? > A language is not a library, it provides most importantly, elementary > semantic with which you design more complex things, more or less > optionally built-ins models (which you can drop if you wish) for most > important things or things identified as such (which is a subjective > topic, you can just expect an average opinion), not for everything in the > world. Exactly this is what I want from Ada. >>> (*) And that implementation is a clean view, unlike the one of String >>> holding UTF-8 data. >> >> You are confusing interface and implementation. This is one of Ada's >> problems that they are not clearly separated. Ada 83 pioneered the idea of >> such separation for user-defined private types, but was not consequent to >> support it for other types, especially, for arrays and records. > Array and records are typically not to be publicly exposed. How so? They are two most used public interfaces of composite types in Ada! BTW the same applies to the numeric types, would you claim them used only privately too? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de