220 28012 <CAF950W+iGwLJT3-x82qwKj=zsyq2S4F+vqj5yB4tDcV1cJ_jtg@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Avi Kivity <avi@scylladb.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Make (strongly typed) enums castable to char
 const * const
Date: Sun, 28 Aug 2016 21:43:33 +0300
Lines: 113
Approved: news@gmane.org
Message-ID: <CAF950W+iGwLJT3-x82qwKj=zsyq2S4F+vqj5yB4tDcV1cJ_jtg@mail.gmail.com>
References: <1472132849.17129.9.camel@bsdforen.de> <CAFk2RUZiqeTBGir3fKehHzju6YDtbigdvThW=CsgkBSaExjrug@mail.gmail.com>
 <npn3iq$4ah$1@blaine.gmane.org> <CANh-dXmFXB6WY=uUt6Qh3PzTGek9e0Av-0h4TLnFzXSY6mAR+A@mail.gmail.com>
 <1f2b9290-581d-1fec-a98d-5efe4f5f8fc9@scylladb.com> <01F1ABC6-E4E6-4524-A29A-106FC4FE8470@googlemail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a114dc7e8f95a0b053b261f3d
X-Trace: blaine.gmane.org 1472409823 23188 195.159.176.226 (28 Aug 2016 18:43:43 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 28 Aug 2016 18:43:43 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDHJFOWD7YCRBV7BRS7AKGQEAWKIELI@isocpp.org Sun Aug 28 20:43:39 2016
Return-path: <std-proposals+bncBDHJFOWD7YCRBV7BRS7AKGQEAWKIELI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f70.google.com ([209.85.218.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDHJFOWD7YCRBV7BRS7AKGQEAWKIELI@isocpp.org>)
	id 1be53Q-0005Lh-8Q
	for gclcip-std-proposals@m.gmane.org; Sun, 28 Aug 2016 20:43:36 +0200
Original-Received: by mail-oi0-f70.google.com with SMTP id u191sf426223226oie.3
        for <gclcip-std-proposals@m.gmane.org>; Sun, 28 Aug 2016 11:43:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=hg2iDOGfn54G34i/lag4Rub4bjKAOuVbSggANWa8Shs=;
        b=dP5vcqzSGlAyPWOm3h6/Im+VElOWloBb6xWARCm2GR8HBiM6vfk/qmHWCZCc0TZFbJ
         ofligZa7mU5ApIq5fNDh/Ptp282Ibw0lYXNuqo1rzucAqZo8024LP/gBVQz3GZDSnROt
         rnfrzb+8VTR2LHFMvEP8veg/P4bkca9xt+I7wD52QZgbRKskvGbXzEF0d5EF8Qmvdwg0
         MKwbnDppSbdIl59II1e5wDagluLh9xBg0gQ4woJuTt0VhWGNsc2M0yN722joN2TVT+dN
         bAm6n9K6wrNisZJ4MUCKE3My2DjfuJX5DKpc8arvVrpIFguK0NBvYZgQRiMhgUHjF+wk
         tR9w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=hg2iDOGfn54G34i/lag4Rub4bjKAOuVbSggANWa8Shs=;
        b=EQkH9oYiN8nkqY4PaJiiTYQbd/M6E+w+s8gI6PjwutelBzDP1pTfkIve3ms2oIOkJo
         TxKHeAZq3YUmbL0hbBaaKj2pXQOh2+GrWldsq7vI48ZW0wfH1KHbSEsrPpD0+PZN7Kfk
         RJDcHtLI419xtxOkqqy+Q4NmNxjQKM0/hMdvkVdSLeUlSj+ZQTQDQe53TunOzyjNYGlJ
         6zmsS9VE0RMahzYFwi8LVbu1ufcK9IVMV365LdafGeuIBnUDu4v7p2HcWkYVq5P8mAxf
         0xGxUmeCEVAz9OfYS2Ot7N3ko//QG66TzTwjggfPbFVX7fvUccmAiwhtdntW32A+2KsF
         2y8Q==
X-Gm-Message-State: AE9vXwPbgSo8DT0OmxOz34CgGVMNxtRT3eGt3KANmAwyraZpsTtiNrbgnw1D/m/khYB9Xw==
X-Received: by 10.36.112.144 with SMTP id f138mr7113026itc.6.1472409816530;
        Sun, 28 Aug 2016 11:43:36 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.26.33 with SMTP id a30ls6014341ote.39.gmail; Sun, 28 Aug
 2016 11:43:35 -0700 (PDT)
X-Received: by 10.31.66.4 with SMTP id p4mr7980805vka.7.1472409815374;
        Sun, 28 Aug 2016 11:43:35 -0700 (PDT)
Original-Received: from mail-ua0-x22b.google.com (mail-ua0-x22b.google.com. [2607:f8b0:400c:c08::22b])
        by mx.google.com with ESMTPS id 37si8372134uak.243.2016.08.28.11.43.35
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sun, 28 Aug 2016 11:43:35 -0700 (PDT)
Received-SPF: pass (google.com: domain of avi@cloudius-systems.com designates 2607:f8b0:400c:c08::22b as permitted sender) client-ip=2607:f8b0:400c:c08::22b;
Original-Received: by mail-ua0-x22b.google.com with SMTP id k90so214334984uak.1
        for <std-proposals@isocpp.org>; Sun, 28 Aug 2016 11:43:35 -0700 (PDT)
X-Received: by 10.31.72.6 with SMTP id v6mr6612997vka.106.1472409814779; Sun,
 28 Aug 2016 11:43:34 -0700 (PDT)
Original-Received: by 10.103.23.131 with HTTP; Sun, 28 Aug 2016 11:43:33 -0700 (PDT)
Original-Received: by 10.103.23.131 with HTTP; Sun, 28 Aug 2016 11:43:33 -0700 (PDT)
In-Reply-To: <01F1ABC6-E4E6-4524-A29A-106FC4FE8470@googlemail.com>
X-Original-Sender: avi@scylladb.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@scylladb-com.20150623.gappssmtp.com;       spf=pass (google.com:
 domain of avi@cloudius-systems.com designates 2607:f8b0:400c:c08::22b as
 permitted sender) smtp.mailfrom=avi@cloudius-systems.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:28012
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28012>

--001a114dc7e8f95a0b053b261f3d
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Aug 28, 2016 9:19 PM, "'Bernd L=C3=B6rwald' via ISO C++ Standard - Futur=
e
Proposals" <std-proposals@isocpp.org> wrote:
>
>
> >  common enough to be standardized.
>
> Honestly though, is it really that common? Raw enum value names are
probably (hopefully) not what are presented to an end user. If it is used
for error codes, you will have some table for actual descriptions. If it is
flags, you probably have a proper parser that is able to handle
combinations as well, and for printing you need that as well.
>
> I would like to claim that only in very rare cases the raw name of an
enumeration value is used, and if, they are for debugging purposes. The
more common case with descriptions would not be covered. Languages like C#
do that via annotations, and the full fledged runtime reflection. But then
comes localization, =E2=80=A6
>
> I obviously understand where the desire to just print readable enum
values comes from and have been there myself, but this feature would
encourage mediocre UX or would not help that much for more than debugging.

Even if it's just used for debugging/logging/tracing, it deserves a place.
Those are requirements for nearly every program.

>
> --
> You received this message because you are subscribed to the Google Groups
"ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/01F1ABC6-E4E6-=
4524-A29A-106FC4FE8470%40googlemail.com
..

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAF950W%2BiGwLJT3-x82qwKj%3Dzsyq2S4F%2Bvqj5yB4tD=
cV1cJ_jtg%40mail.gmail.com.

--001a114dc7e8f95a0b053b261f3d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr"></p>
<p dir=3D"ltr">On Aug 28, 2016 9:19 PM, &quot;&#39;Bernd L=C3=B6rwald&#39; =
via ISO C++ Standard - Future Proposals&quot; &lt;<a href=3D"mailto:std-pro=
posals@isocpp.org">std-proposals@isocpp.org</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; &gt;=C2=A0 common enough to be standardized.<br>
&gt;<br>
&gt; Honestly though, is it really that common? Raw enum value names are pr=
obably (hopefully) not what are presented to an end user. If it is used for=
 error codes, you will have some table for actual descriptions. If it is fl=
ags, you probably have a proper parser that is able to handle combinations =
as well, and for printing you need that as well.<br>
&gt;<br>
&gt; I would like to claim that only in very rare cases the raw name of an =
enumeration value is used, and if, they are for debugging purposes. The mor=
e common case with descriptions would not be covered. Languages like C# do =
that via annotations, and the full fledged runtime reflection. But then com=
es localization, =E2=80=A6<br>
&gt;<br>
&gt; I obviously understand where the desire to just print readable enum va=
lues comes from and have been there myself, but this feature would encourag=
e mediocre UX or would not help that much for more than debugging.</p>
<p dir=3D"ltr">Even if it&#39;s just used for debugging/logging/tracing, it=
 deserves a place. Those are requirements for nearly every program.<br></p>
<p dir=3D"ltr">&gt;<br>
&gt; --<br>
&gt; You received this message because you are subscribed to the Google Gro=
ups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
&gt; To unsubscribe from this group and stop receiving emails from it, send=
 an email to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-=
proposals+unsubscribe@isocpp.org</a>.<br>
&gt; To post to this group, send email to <a href=3D"mailto:std-proposals@i=
socpp.org">std-proposals@isocpp.org</a>.<br>
&gt; To view this discussion on the web visit <a href=3D"https://groups.goo=
gle.com/a/isocpp.org/d/msgid/std-proposals/01F1ABC6-E4E6-4524-A29A-106FC4FE=
8470%40googlemail.com">https://groups.google.com/a/isocpp.org/d/msgid/std-p=
roposals/01F1ABC6-E4E6-4524-A29A-106FC4FE8470%40googlemail.com</a>.<br></p>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAF950W%2BiGwLJT3-x82qwKj%3Dzsyq2S4F%=
2Bvqj5yB4tDcV1cJ_jtg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAF950W%2Bi=
GwLJT3-x82qwKj%3Dzsyq2S4F%2Bvqj5yB4tDcV1cJ_jtg%40mail.gmail.com</a>.<br />

--001a114dc7e8f95a0b053b261f3d--

.
