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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,d5b211b0c1ffcf3e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.205.134.138 with SMTP id ic10mr437476bkc.8.1339698070823; Thu, 14 Jun 2012 11:21:10 -0700 (PDT) Path: e27ni48213bkw.0!nntp.google.com!news1.google.com!news2.google.com!goblin2!goblin.stu.neva.ru!feeder2.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 11 Jun 2012 22:50:33 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Practicalities of Ada for app development References: <1c82b5mc3waww.1t6q6vj61u36u.dlg@40tude.net> <42a87cf3ce9bfd6054f78b2b5b356301@dizum.com> <4fd60053$0$9510$9b4e6d93@newsspool1.arcor-online.net> <4fd62785$0$9518$9b4e6d93@newsspool1.arcor-online.net> <1crzx65j543zy.1ptlx1vf7esmq.dlg@40tude.net> In-Reply-To: <1crzx65j543zy.1ptlx1vf7esmq.dlg@40tude.net> Message-ID: <4fd65a15$0$9507$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 11 Jun 2012 22:50:29 CEST NNTP-Posting-Host: 377f9d73.newsspool1.arcor-online.net X-Trace: DXC=ER6n@Oi1gRO[6=1B@oB@@@ic==]BZ:afN4Fo<]lROoRAnkgeX?EC@@@[A^MO;>XjJGPCY\c7>ejVHAa<63QmIZbEibm08>1_=2C X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-06-11T22:50:29+02:00 List-Id: On 11.06.12 20:38, Dmitry A. Kazakov wrote: >> The construction function could be nicely Unicode-ish when named U: >> >> PI : constant Code_Point := U+16#03C0#; > > Funny, but U+number is a notation for a language lacking proper numeric > types. Why not to use just number if the language allows that? My style rules will suggests qualification, Code_Point'(16#03C0#), so as to state what I mean without any necessity to inferen from context. Reason: numeric literals typically mean a number of some "arithmetic" type. U+number is similar to the explicit checking of units (and possibly values) in Some_Time_Object := 45 * Seconds; presented in Barnes's book. When using U+number, the checks are performed by one subprogram ("+"). A different design might (but need not) require checking in many places. U+number feels a bit like using a "constructor" for literals. > BTW, as practice shows, code points are used rarely and almost always as an > argument for conversion to a UTF-8 string. OK. I imagine, though, that most US programming styles will suggest not to write non-7-bit source text. When I need a UTF-8 encoded literal PI, wouldn't I then need to write something like the following? PI : constant UTF_8_String := Character'Val (16#CF#) & Character'Val (16#80#) & Character'Val (16#0A#);