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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham 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,UTF8 Received: by 10.68.8.199 with SMTP id t7mr155044pba.3.1319225447688; Fri, 21 Oct 2011 12:30:47 -0700 (PDT) Path: d5ni40622pbc.0!nntp.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Why no Ada.Wide_Directories? Date: Fri, 21 Oct 2011 21:30:45 +0200 Organization: Ada @ Home 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> <4d97ced2-1695-4352-926c-2070f9ccbbf1@o19g2000vbk.googlegroups.com> <1cchjqhfjqo2l$.1s951jo0p9w8c.dlg@40tude.net> NNTP-Posting-Host: q7N8AolrQHo0KApF9Qa31g.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.51 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: news2.google.com comp.lang.ada:14134 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2011-10-21T21:30:45+02:00 List-Id: Le Fri, 21 Oct 2011 20:34:55 +0200, Dmitry A. Kazakov = a =C3=A9crit: >>> Not really. Wide_Wide_String is one possible implementation of logic= al >>> Unicode string. >> And precisely, that implementation is sufficient (*). > > Nope. Under Windows I rather need UTF-16 and ASCII. Under Linux it wou= ld = > be > UTF-8 and RADIX-50 for RSX-11. This is implementation. The model on either an UTF-8 or an UTF-16 system= , = would still be the one of Wide_Wide_Character. Linux may be UTF-8 = internally, I use Unicode in Linux, not UTF-8. Windows may be UTF-16 = internally, I use Unicode in Windows and not UTF-16. From within neither= , = one will access UTF-8 or UTF-16 low level storage units, and instread wi= ll = access Unicode character at hight level. If a given compiler implements = = Wide_Wide_Character using one or another encoding, is another story. The error of using String in some areas of the standard packages, does n= ot = invalidate Wide_Wide_String. >> 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 th= e = world. Providing a model for Unicode is reasonably enough. >> (*) 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 ide= a = > 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. Most of time= , = when you define a record type, the record view appears in the package = private part only, the same with arrays. The Ada standard library doesn'= t = expose records (or else I can't recall one), but indeed exposes some = arrays, which should be hidden in a clean design. However, this may be = justified as a naive while still valid implementation, as much as a simp= le = and efficient enough implementation. Arrays has an interface, even if th= is = cannot be tweaked from the programmer's point of view. Array and records= = are basic bricks to implement types, not the core of the type models. Th= is = does not disallow pure abstract data types. There are non-perfect things in the library, but as long as Ada as a = language allows to define what you need, opinions should be measured. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [Ep= igrams on = Programming =E2=80=94 Alan J. =E2=80=94 P. Yale University] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [Idem] Java: Write once, Never revisit