220 28011 <01F1ABC6-E4E6-4524-A29A-106FC4FE8470@googlemail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: =?UTF-8?Q?=27Bernd_L=C3=B6rwald=27_via_ISO_C=2B=2B_Standard_=2D_Future_Proposal?=
	=?UTF-8?Q?s?= <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Make (strongly typed) enums castable to char
 const * const
Date: Sun, 28 Aug 2016 20:19:20 +0200
Lines: 29
Approved: news@gmane.org
Message-ID: <01F1ABC6-E4E6-4524-A29A-106FC4FE8470@googlemail.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>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0 (1.0)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1472408370 22487 195.159.176.226 (28 Aug 2016 18:19:30 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 28 Aug 2016 18:19:30 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCRYJC6T6QKRBK6WRS7AKGQEVEWFM6A@isocpp.org Sun Aug 28 20:19:24 2016
Return-path: <std-proposals+bncBCRYJC6T6QKRBK6WRS7AKGQEVEWFM6A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f70.google.com ([209.85.215.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCRYJC6T6QKRBK6WRS7AKGQEVEWFM6A@isocpp.org>)
	id 1be4fz-0005Dw-7A
	for gclcip-std-proposals@m.gmane.org; Sun, 28 Aug 2016 20:19:23 +0200
Original-Received: by mail-lf0-f70.google.com with SMTP id p85sf84227668lfg.3
        for <gclcip-std-proposals@m.gmane.org>; Sun, 28 Aug 2016 11:19:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:subject:from:in-reply-to:date
         :content-transfer-encoding:message-id:references: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=2Dbp5bH8smy3EtNyitM9qCGNret+l45nk87I6ygs1LE=;
        b=cVOiPmhFFHNaBMVrT+4gmTUpJkJ5L1POHMcAxYS0BTVnfeaPA5WXsl2qrolFGOtwDd
         37xtKH6Y1soylrr25THEtV3cZZjx1btTEP5XOeTRDsidkiRRk9gmiJQORPnpJ4oygx08
         NF5DEk3kLUiAqGrXZoDyXaZzc8RSAKY0IYjndWSEXPiYFqXSnQm7TKCt0ob+gXpit8TP
         zpiS2DbqzIUv4ag/AVSGaKdfQy4vNyHpTx9tiIxMUDYtIoaT8Z3cJgvczN/WgiLDaf1X
         t5HFKrSTYLR35yG0hBoNXFqlYuM1MboJKq4aA3OyJxVMfwiLWfQ8GcshB3kER04rSBPd
         fuaQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:subject:from:in-reply-to:date
         :content-transfer-encoding:message-id:references: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=2Dbp5bH8smy3EtNyitM9qCGNret+l45nk87I6ygs1LE=;
        b=HfuP+mqJz7qxHDzDjINqsX48jkVdFMQlehwVU/kgFEkF+NvonpvbRxyFi29ANpdjsJ
         OloxaCdo665BWxS54A44NT7RhxbXoQZp8dVcvATGk+dSE0N4FSKKbbHGBooyvhhRAQUK
         RFnSzDJkOw91DY1p5by0EcKJQcs9eR1NNrZQnzpq95+S76j3DFeXjv0yQIRtQLETv1kG
         jGYnLOwpQ7m3Ceu5rswIUYhJ6qDI3mdgm+dtXPTZRlQ2C0YeJMP0+Stjj12BFOSeIjt+
         v5Q4XfnPEwh4EidPFF/h3IZKuwVBqPhaeuRioBtHbTC5zYIKOvp11+n2clQl5SlGKL7h
         CN4 
X-Gm-Message-State: AE9vXwOSrPYuEjvuR1hkdGWR/EAd2+zdQqXjHwkNl6q5WFk0Gqv8Awr/Q9YG45QA6NbZ/Q==
X-Received: by 10.46.33.96 with SMTP id h93mr1771554ljh.4.1472408364330;
        Sun, 28 Aug 2016 11:19:24 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.46.72 with SMTP id u69ls2029968wmu.8.gmail; Sun, 28 Aug
 2016 11:19:22 -0700 (PDT)
X-Received: by 10.195.12.77 with SMTP id eo13mr12270512wjd.142.1472408362896;
        Sun, 28 Aug 2016 11:19:22 -0700 (PDT)
Original-Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com. [2a00:1450:400c:c09::233])
        by mx.google.com with ESMTPS id xq6si28855111wjb.273.2016.08.28.11.19.22
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sun, 28 Aug 2016 11:19:22 -0700 (PDT)
Received-SPF: pass (google.com: domain of bloerwald@googlemail.com designates 2a00:1450:400c:c09::233 as permitted sender) client-ip=2a00:1450:400c:c09::233;
Original-Received: by mail-wm0-x233.google.com with SMTP id o80so60574189wme.1
        for <std-proposals@isocpp.org>; Sun, 28 Aug 2016 11:19:22 -0700 (PDT)
X-Received: by 10.194.221.202 with SMTP id qg10mr11904008wjc.180.1472408362636;
        Sun, 28 Aug 2016 11:19:22 -0700 (PDT)
Original-Received: from ?IPv6:2a02:810b:8300:2658:105:beae:f9a6:cee9? ([2a02:810b:8300:2658:105:beae:f9a6:cee9])
        by smtp.gmail.com with ESMTPSA id yz6sm30513175wjb.35.2016.08.28.11.19.21
        (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
        Sun, 28 Aug 2016 11:19:21 -0700 (PDT)
X-Mailer: iPhone Mail (13G35)
In-Reply-To: <1f2b9290-581d-1fec-a98d-5efe4f5f8fc9@scylladb.com>
X-Original-Sender: BLoerwald@googlemail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@googlemail.com;       spf=pass (google.com: domain of
 bloerwald@googlemail.com designates 2a00:1450:400c:c09::233 as permitted
 sender) smtp.mailfrom=bloerwald@googlemail.com;       dmarc=pass
 (p=QUARANTINE dis=NONE) header.from=googlemail.com
X-Original-From: =?utf-8?Q?Bernd_L=C3=B6rwald?= <bloerwald@googlemail.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:28011
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28011>


>  common enough to be standardized.

Honestly though, is it really that common? Raw enum value names are probabl=
y (hopefully) not what are presented to an end user. If it is used for erro=
r 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 we=
ll, and for printing you need that as well.

I would like to claim that only in very rare cases the raw name of an enume=
ration value is used, and if, they are for debugging purposes. The more com=
mon case with descriptions would not be covered. Languages like C# do that =
via annotations, and the full fledged runtime reflection. But then comes lo=
calization, =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 med=
iocre UX or would not help that much for more than debugging.=20

--=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/01F1ABC6-E4E6-4524-A29A-106FC4FE8470%40googlemai=
l.com.

.
