C++ Logo

sg16

Advanced search

Re: [SG16] Non-identifier characters in ud-suffix

From: Corentin Jabot <corentinjabot_at_[hidden]>
Date: Wed, 8 Apr 2020 10:22:51 +0200
On Wed, 8 Apr 2020 at 09:18, Peter Brett via SG16 <sg16_at_[hidden]>
wrote:

> Hi all,
>
>
>
> Changing *ud-suffix* to something other than an identifier would be a
> significant change to the standard. It would be necessary to define a
> specific set of acceptable characters (for example, should emoji & ZWJ be
> permitted?) with regard to preventing language ambiguities, facilitating
> future evolution of the language, and ensuring source code readability.
>
>
>
> I think that *ud-suffix­* should continue to be an identifier, and if it
> that was to change then someone needs to write a paper.
>

To add to that none of the Symbol Currency Unicode codepoints are either
identifier start nor identifier continue. I would further object to $ being
used as an identifier start, as I think it should be reserved for future
uses

>
>
> In the meantime, people programming in C++ can easily define suffices
> using standard alphabetical currency codes, e.g. 10500_JPY.
>
>
>
> Best regards,
>
>
>
> Peter
>
>
>
> P.S. I can’t think of any use-cases where a currency *ud-suffix­* is
> anything other than a horrible idea until we get fixed point or decimal
> floating point types into C++! From one of the e-mails underlying the CWG
> issue:
>
>
>
> money operator""_ ¢(long double);
>



>
>
> Friends don’t let friends store currency values in binary floating point.
> 😉
>
>
>
> *From:* SG16 <sg16-bounces_at_[hidden]> *On Behalf Of *Tom Honermann
> via SG16
> *Sent:* 08 April 2020 04:37
> *To:* sg16_at_[hidden]
> *Cc:* Tom Honermann <tom_at_[hidden]>; Richard Smith <
> richardsmith_at_[hidden]>
> *Subject:* Re: [SG16] Non-identifier characters in ud-suffix
>
>
>
> EXTERNAL MAIL
>
> On 4/7/20 11:23 PM, JF Bastien via SG16 wrote:
>
> Hi SG16,
>
>
>
> I'd like you to take on CWG issue #1871
> <https://urldefense.com/v3/__http:/wg21.link/cwg1871__;!!EHscmS1ygiU1lA!XgdhVheKao-dQOXEGUzlWwF_6JQDXKy30G0s23T1HhEoITo0_QghqfgYBSk_lA$>
> :
>
> 1871. Non-identifier characters in *ud-suffix*
>
> *Section: *5.13.8 [lex.ext] *Status: *extension *Submitter: *Richard
> Smith *Date: *2014-02-17
>
> (From messages 24712
> <https://urldefense.com/v3/__http:/listarchives.isocpp.org/cgi-bin/wg21/message?wg=core&msg=24712__;!!EHscmS1ygiU1lA!XgdhVheKao-dQOXEGUzlWwF_6JQDXKy30G0s23T1HhEoITo0_QghqfjB4qRTPQ$>
> through 24714
> <https://urldefense.com/v3/__http:/listarchives.isocpp.org/cgi-bin/wg21/message?wg=core&msg=24714__;!!EHscmS1ygiU1lA!XgdhVheKao-dQOXEGUzlWwF_6JQDXKy30G0s23T1HhEoITo0_QghqfiAPF1yYQ$>
> , 24716
> <https://urldefense.com/v3/__http:/listarchives.isocpp.org/cgi-bin/wg21/message?wg=core&msg=24716__;!!EHscmS1ygiU1lA!XgdhVheKao-dQOXEGUzlWwF_6JQDXKy30G0s23T1HhEoITo0_QghqfgJCFQS7g$>
> , 24717
> <https://urldefense.com/v3/__http:/listarchives.isocpp.org/cgi-bin/wg21/message?wg=core&msg=24717__;!!EHscmS1ygiU1lA!XgdhVheKao-dQOXEGUzlWwF_6JQDXKy30G0s23T1HhEoITo0_QghqfhrNz-h1Q$>,
> and 24719
> <https://urldefense.com/v3/__http:/listarchives.isocpp.org/cgi-bin/wg21/message?wg=core&msg=24719__;!!EHscmS1ygiU1lA!XgdhVheKao-dQOXEGUzlWwF_6JQDXKy30G0s23T1HhEoITo0_QghqfgwA6WdwQ$>
> .)
>
> A *ud-suffix* is defined in 5.13.8 [lex.ext] as an *identifier*. This
> prevents plausible user-defined literals for currency symbols, which are
> not categorized as identifier characters.
>
> *Rationale (June, 2014):*
>
> CWG felt that a decision on whether to allow this capability or not should
> be considered by EWG.
>
>
>
> Please let EWG know what you think, given the ongoing TR31 work. EWG will
> then discuss your proposal, hopefully adopting it as-is, and forward to CWG.
>
> Sounds good. I filed an SG16 issue (
> https://github.com/sg16-unicode/sg16/issues/61
> <https://urldefense.com/v3/__https:/github.com/sg16-unicode/sg16/issues/61__;!!EHscmS1ygiU1lA!XgdhVheKao-dQOXEGUzlWwF_6JQDXKy30G0s23T1HhEoITo0_Qghqfjvv_kAFQ$>)
> to ensure we follow up on this. We'll discuss at an upcoming telecon.
>
> Tom.
>
>
>
> Thanks,
>
>
>
> JF
>
>
>
>
> --
> SG16 mailing list
> SG16_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/sg16
>

Received on 2020-04-08 03:26:19