220 41206 <9fa1b055-91e4-3a90-3aba-340efa5db725@wanadoo.fr> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Proposal: Extensions of Scoped Enumerations
Date: Mon, 3 Dec 2018 07:57:31 +0100
Lines: 138
Approved: news@gmane.org
Message-ID: <9fa1b055-91e4-3a90-3aba-340efa5db725@wanadoo.fr>
References: <506ba0a8-2d6b-4a4d-8fe8-b5e94d232365@isocpp.org>
 <82c331a0-fb81-4b67-8a7e-c5a6b8929e00@isocpp.org>
 <43b3f4ec-fd19-4144-bf24-067ce587e071@isocpp.org>
 <d54cc535-542f-4a7b-80f9-b4dab85e0ca4@isocpp.org>
 <9e3bba78-04c2-42d5-b522-2712932c1659@isocpp.org>
 <CA+AqvO1Tdn-2NyEUBVMVJnuQw+fsxym0gKVv1F5Q3sq3h5rLGw@mail.gmail.com>
 <ea51f7a2-d576-4fd0-a182-b8c91f9c3656@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------913A562C87EF390F90EE6AE6"
X-Trace: blaine.gmane.org 1543820129 12215 195.159.176.226 (3 Dec 2018 06:55:29 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 3 Dec 2018 06:55:29 +0000 (UTC)
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:60.0)
 Gecko/20100101 Thunderbird/60.3.2
To: std-proposals@isocpp.org, philipgins@gmail.com
Original-X-From: std-proposals+bncBDH67CONY4PBBXVHSPQAKGQE3IMRMYA@isocpp.org Mon Dec 03 07:55:25 2018
Return-path: <std-proposals+bncBDH67CONY4PBBXVHSPQAKGQE3IMRMYA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr1-f71.google.com ([209.85.221.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDH67CONY4PBBXVHSPQAKGQE3IMRMYA@isocpp.org>)
	id 1gTi8b-00034Q-4b
	for gclcip-std-proposals@m.gmane.org; Mon, 03 Dec 2018 07:55:25 +0100
Original-Received: by mail-wr1-f71.google.com with SMTP id j30sf9288527wre.16
        for <gclcip-std-proposals@m.gmane.org>; Sun, 02 Dec 2018 22:57:36 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1543820255; cv=pass;
        d=google.com; s=arc-20160816;
        b=VRpyk0rz4AzzCg6zsNOaiHo+Ey8KSP9uS9uzzhypOI2hPmcFhSg5uwvoAaubiUqUYR
         9/an9H86V6PFVqd9iUAsitsNo/LB5nAcXVpUNT8ZUaPAnOT3A8qnKShH3yILFHPNH6Un
         wVu6XioulrU/pJdTc/q198KOzfp0AKhKozuohrBvOTnlfg62hJr4SwBhglca3t+kbn4+
         VOLDEtNc9B/WgdF+GhPeuH9dy4h/KULUemzDTiIX09LaGA1PWPkhife2yzboagTWhWNx
         GCKg2PswqBT1giJ8HR5hi2iXUe/xhmQkSXCSDFJC2tH65P+qiLAGr/arR7ngRqFOfm2y
         oeyA==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-language
         :in-reply-to:mime-version:user-agent:date:message-id:from:references
         :to:subject:dkim-signature;
        bh=44+8U7BQPNAl/y88R7hwdzHZHgsElq+TN0mzRXFEYc4=;
        b=OAZXItBgEJ3qe2tQenfqPNgqQXc4Grm0fiNuzYHDOuLB8rdagTXVs/bdHHq2Gy6AwL
         t8h+vG11d3HPLJlKNd75K7RUXX/pd/SRKsMVybfvnXtXPhqFYkufBAp5PiT83SYdOWCv
         qA3i8ctDgYBxZQD7TpJhEIoLng7Qx4tdWRuD0RAcnHXvMbxOfgM6HCh9p3xQ0lTjC00M
         EITgBQ23vkoN/IknWQYuSVLnQL3hfZDD1Zh6nTvaZ9R33uNYCFqQcwu8LQ7X9kmCzzgG
         3NRlG7M6oDdj6sq5+g0pt6NJ83KoUsan+94ULC0qbU1CPU6lpuQwmj5TTj/f1GMO4L3y
         d5Ww==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) smtp.mailfrom=vicente.botet@wanadoo.fr
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-to:content-language:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=44+8U7BQPNAl/y88R7hwdzHZHgsElq+TN0mzRXFEYc4=;
        b=hFiFlHFguGT0N3WMA68XCSgJ2dUgjDqgSY6G0UQWXXJj24v6uQfQUPZfuRm9lJBTkg
         O6ttYmHeVlf5QcMCjaQuAclyHvAjR09mt8yCzvutxAKSaSJBOha5UgNRpxsFu7rRZyYD
         4nnsYIf9SrQpSI0/8YX1kSC+EDn1fpZyFn5Af9gEZFnXxXXCFzJu3+Bsi10Flkxrnj8d
         gALe8e06fygx0mtw1t19nuYLdy2y35FmaGSg+v+DchlFPGjDlhMtIxn1BP6VhojLnUaW
         4flf0exuC1M6lQOn1kR8kKfNyetJdUztUhlgTVjk0tAjn/MjDyeirBIeIxZVhKYcqjC5
         WAMw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to:content-language
         :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=44+8U7BQPNAl/y88R7hwdzHZHgsElq+TN0mzRXFEYc4=;
        b=A0RHPsfdizFfWIjUuRsAqUQcnhmMew1902VkTxUw0H+sxpddS+JLV5aL68JyL1rhC0
         E6vNgD4Kp1Jw2hRly6aIeoxEjXGQyNqEwyfqAgK8uCgFsR/gQd2qmiBpnuDvfelBisnO
         BAKfTNB9ElAD79iz34SAhySJm+yBhie1sTPEdcDUJyHdzu2+suMb+D0y7Dg5PqJomiRa
         5RvfKhlK6N9xxaF4Hu/1ft2SL/lUQ+HVBZZJb1X69Gh7x69cNd8xQtURXamD04rdaiAO
         P2f/UQd2/0qKYTZwsqUpm9GX05/9Nhs4PlV0KGhR1WxZaTKYybdyn65fASQrdZCxu8Fo
         / 
X-Gm-Message-State: AA+aEWYnuDBMLnVMTpHwIqjTizKh5DFRsyDrE91vt/h+zqbYTiM4diRz
	xkrPQMSVGPmIC0k2S0vJE0w=
X-Google-Smtp-Source: AFSGD/X84cbHogbvN/a5OVcl+/N4yVgI/k4cYRIwy3lvkpraGFk7p7Cg5zY1TBQKdrPgCVgFf7LDOQ==
X-Received: by 2002:a1c:860f:: with SMTP id i15mr182510wmd.24.1543820255642;
        Sun, 02 Dec 2018 22:57:35 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a5d:4982:: with SMTP id r2ls3677299wrq.0.gmail; Sun, 02 Dec
 2018 22:57:34 -0800 (PST)
X-Received: by 2002:a5d:6487:: with SMTP id r7mr13224943wru.263.1543820254519;
        Sun, 02 Dec 2018 22:57:34 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1543820254; cv=none;
        d=google.com; s=arc-20160816;
        b=z+B+wZz5si703aEOH6zaIHha6VIii3TvhtBnehgxaOTxfGVCagGhnHK8+A87N5RzVY
         I/VVwePjP0p7kWyBiVCiExbJAni8nORY5v6f8wr1J5BAqhoNG0/GIQw5c5JpAgP2dIEG
         jfh67YieZq9kT+AoFSrlQvyF/nsenlUSrpghCZtJIM8CTqeA3Ii93yr56+8G5zIzmWmZ
         b8Mj2Y7K686o/9icM3G+X8vpXgzNPVOp51zMenLTsKb+m77q2ew97onLrfWZ3bPZKKW8
         VtbegginZeiZLuBHh7s7V/5P/beU3jR4SzW/jZ4F6It1JFiWmt7Tf/OH/s6bW4obaSps
         VBTA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-language:in-reply-to:mime-version:user-agent:date
         :message-id:from:references:to:subject;
        bh=G0ebRrNffFqSl73xRgGVNcFBtbjEVMJ5SWFmvON397g=;
        b=YJ9G/vyfGBbUeOSfSmK3W4tu3ELMvyuIWK/lU8FLCIQryCRqhSPflxAhkeR9joBOKX
         ZpwHNHcfh7J5Z4v1T8dF98Roph6zQELmQDfhXfvEkh9ydPPoMzxqynio1HAuzFFZl1uo
         a3TJuXWWSpDm/HWHYlmwJ6fbioxD/nXJfuJnEJBVa/ljN0WB2RQmJ0qx/gLdag2klU34
         fSuMGYGtUwb4irtZIYhiaxc6lCmDafeDWFvpnf7j/C0xfZxdAriZoXvo5+7yIA2AtqQl
         WuUN+KupI1W8aJqSCr7jrtDdGSmmuPjmlQIXfVuIzMBKeIiuzs/qC//t3jDBA1i7A6+F
         eIpQ==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) smtp.mailfrom=vicente.botet@wanadoo.fr
Original-Received: from smtp.smtpout.orange.fr (smtp01.smtpout.orange.fr. [80.12.242.123])
        by mx.google.com with ESMTPS id m12si4875034wmc.50.2018.12.02.22.57.34
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=AES128-SHA bits=128/128);
        Sun, 02 Dec 2018 22:57:34 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.123 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) client-ip=80.12.242.123;
Original-Received: from imac-de-vicente-botet-escriba.home ([83.205.44.191])
	by mwinf5d48 with ME
	id 7JxY1z00B47V06j03JxZ9o; Mon, 03 Dec 2018 07:57:34 +0100
X-ME-Helo: imac-de-vicente-botet-escriba.home
X-ME-Auth: dmljZW50ZS5ib3RldEB3YW5hZG9vLmZy
X-ME-Date: Mon, 03 Dec 2018 07:57:34 +0100
X-ME-IP: 83.205.44.191
In-Reply-To: <ea51f7a2-d576-4fd0-a182-b8c91f9c3656@isocpp.org>
Content-Language: en-US
X-Original-Sender: vicente.botet@wanadoo.fr
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 80.12.242.123 is neither permitted nor denied by best guess
 record for domain of vicente.botet@wanadoo.fr) smtp.mailfrom=vicente.botet@wanadoo.fr
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:41206
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/41206>

This is a multi-part message in MIME format.
--------------913A562C87EF390F90EE6AE6
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 02/12/2018 =C3=A0 22:22, philipgins@gmail.com a =C3=A9crit=C2=A0:
> @Vicente:
> I have reworked the introduction=20
> <https://github.com/ginsbach/CppProposal/blob/release_70/ExtendedScopedEn=
umerations.pdf>=20
> and inserted a discussion chapter using the week day example that you=20
> provided, thank you very much for it. Do you think this is clearer now?
>
Yes, it is better. I'll see if I can propose some improvements.

The use of extension could be misleading as other languages uses extends=20
for inheritance.

The systax part could talk about the possible use of <: as a sub-tyte=20
relationship between enums, even if you are not proposing it.

BTW, concerning restriction, the fact that we can express it as a=20
predicate, is not a good rationale to don't have a mechanism to define a=20
type. See how we are introducing types as not_null<Ptr> in the GSL.

More I think on your example and more I believe there is something wrong=20
with it as motivating example. While I agree with you that a Tokenizer=20
has not to use a SyntaxType enum, I don't see why a Parser must mix=20
TokenTypes and SyntaxTypes. A Syntax Node is not a Token Node. We have=20
the token ':' but we don't have an associated syntax type. Having to do=20
the explicit mapping from TokenType to SyntaxType seems to me the best.=20
I don't believe this would pass code review with our standards. What is=20
the cost of not having using this feature on this example? As I say,=20
this implies to do some kind of conversion at some time. This=20
conversions is defined by the user and so must be maintained. It could=20
have a little run-time penalty. BTW, what happens with your example if=20
we add new TokenTypes. I believe we need a better example for=20
extensions. I'll think a little bit on that.


Hopping this helps,

Vicente

--=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/9fa1b055-91e4-3a90-3aba-340efa5db725%40wanadoo.f=
r.

--------------913A562C87EF390F90EE6AE6
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8=
">
  </head>
  <body text=3D"#000000" bgcolor=3D"#FFFFFF">
    <div class=3D"moz-cite-prefix">Le 02/12/2018 =C3=A0 22:22,
      <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:philipgins@gmail=
..com">philipgins@gmail.com</a> a =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote type=3D"cite"
      cite=3D"mid:ea51f7a2-d576-4fd0-a182-b8c91f9c3656@isocpp.org">
      <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF=
-8">
      <div dir=3D"ltr">
        <div>@Vicente:</div>
        <div>I have <a
href=3D"https://github.com/ginsbach/CppProposal/blob/release_70/ExtendedSco=
pedEnumerations.pdf"
            moz-do-not-send=3D"true">reworked the introduction</a> and
          inserted a discussion chapter using the week day example that
          you provided, thank you very much for it. Do you think this is
          clearer now?</div>
        <div><br>
        </div>
      </div>
    </blockquote>
    <p>Yes, it is better. I'll see if I can propose some improvements.</p>
    <p>The use of extension could be misleading as other languages uses
      extends for inheritance.</p>
    <p>The systax part could talk about the possible use of &lt;: as a
      sub-tyte relationship between enums, even if you are not proposing
      it. <br>
    </p>
    <p>BTW, concerning restriction, the fact that we can express it as a
      predicate, is not a good rationale to don't have a mechanism to
      define a type. See how we are introducing types as
      not_null&lt;Ptr&gt; in the GSL.<br>
    </p>
    <p>More I think on your example and more I believe there is
      something wrong with it as motivating example. While I agree with
      you that a Tokenizer has not to use a SyntaxType enum, I don't see
      why a Parser must mix TokenTypes and SyntaxTypes. A Syntax Node is
      not a Token Node. We have the token ':' but we don't have an
      associated syntax type. Having to do the explicit mapping from
      TokenType to SyntaxType seems to me the best. I don't believe this
      would pass code review with our standards. What is the cost of not
      having using this feature on this example? As I say, this implies
      to do some kind of conversion at some time. This conversions is
      defined by the user and so must be maintained. It could have a
      little run-time penalty. BTW, what happens with your example if we
      add new TokenTypes. I believe we need a better example for
      extensions. I'll think a little bit on that. <br>
    </p>
    <p><br>
    </p>
    <p>Hopping this helps,</p>
    <p>Vicente<br>
    </p>
  </body>
</html>

<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/9fa1b055-91e4-3a90-3aba-340efa5db725%=
40wanadoo.fr?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9fa1b055-91e4-3a90-3aba-340efa5db725=
%40wanadoo.fr</a>.<br />

--------------913A562C87EF390F90EE6AE6--

.
