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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: State of the compiler market Date: Fri, 30 Jun 2017 09:34:37 +0200 Organization: A noiseless patient Spider Message-ID: References: <1813789782.509760763.093426.laguest-archeia.com@nntp.aioe.org> <87varxjouh.fsf@nightsong.com> <250466748.510009784.561340.laguest-archeia.com@nntp.aioe.org> <87fuelzvcq.fsf@jacob-sparre.dk> <4e60ac97-7f4f-47e7-847a-e27983accd4b@googlegroups.com> <57c26106-4e4f-464f-83e9-fe52de614cd7@googlegroups.com> <6529c392-f042-4dfe-8cdb-b785406ad788@googlegroups.com> <8643cc5f-7b09-479f-825d-8060aad7d628@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 30 Jun 2017 07:30:57 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="4ad7cbfdf76bf49341b8c76585b4910d"; logging-data="9981"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18SmM9GzKt0Croh968n09YA" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 In-Reply-To: Content-Language: fr Cancel-Lock: sha1:GkQIdTZgm28Zp6r8QbhglbtdN2s= Xref: news.eternal-september.org comp.lang.ada:47207 Date: 2017-06-30T09:34:37+02:00 List-Id: Le 30/06/2017 à 09:18, Dmitry A. Kazakov a écrit : > Encoding must be a part of the string type. This is essential for > dealing with OS/API bindings. E.g. an UTF-8 string must provide a view > of an array of octets (for OS/API calls) and a view of an array of code > points (for the application). The second view must constitute a class. > We don't need explicit conversions between string types. > This is your opinion. I don't see why it must constitute a class. I tend to use the simplest structure available for my need, hence avoid tagged types unless they are the most appropriate structure. Moreover, encodings are useful only at the boundary between the application and the external world, internal processing should use the internal form, i.e. characters (characters are the abstract notion to which a code point is associated). Therefore, conversions at the boundary seem quite appropriate > But the point is that the language should not have string types at all. > The type system should be capable to define things as described above at > the library level. Then you should be happy. There is absolutely no magic about String in Ada (as opposed to most other languages), and string types ARE simply defined in a package (namely Standard). They are known to the compiler only for attributes that return a string type. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr