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!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: State of the compiler market Date: Fri, 30 Jun 2017 12:53:59 +0200 Organization: Aioe.org NNTP Server 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> NNTP-Posting-Host: vZYCW951TbFitc4GdEwQJg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:47220 Date: 2017-06-30T12:53:59+02:00 List-Id: On 30/06/2017 12:10, J-P. Rosen wrote: > Le 30/06/2017 à 10:10, Dmitry A. Kazakov a écrit : >> Semantically all strings are chains of code points. > But different strings may use different encoded character sets, hence > different code points. Even when they rarely do, that is a constraint, almost never static as you have no control on the text input. >> True, however for performance reasons many applications tend to deal >> with UTF-8 octets rather than with code points. I doubt anybody uses >> characters at all. > ?? I certainly use it, or Wide_Character for ASIS applications. You probably do it as a code point, not as a character. > If you > need to sort strings, or do anything more complicated than storing > strings, you'd better decode the strings and not keep them as UTF-8. Why? The order induced by code points has no more sense that one induced by octets. For parsing and compiling I practically never use code points. Searching a table of tokens ordered by octets works just fine. >> The magic is called array. You have to use magic spell "type ... is >> array (...) of ..." with severe limitation coming with. > ?? Array magic? It is a normal construct of any (almost) programming > language. Any construct which cannot be expressed through other constructs is magic per definition. > Unless you are so OO-maniac as to consider that a 10-elements > structure should be an extension of a 9-elements structure... Huh, but arrays are OO-maniacal because an array slice is substitutable for array and conversely. In that sense one is an extension of another. This type equivalence induces a class of array/slice types, all done magically in Ada. The plea is to have a type mechanics to express such relationships at the library level. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de