220 29345 <6a3dd40c-c25c-2440-b8b5-922700a4d989@honermann.net> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Tom Honermann <tom@honermann.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: std::byte thoughts
Date: Wed, 2 Nov 2016 10:14:32 -0400
Lines: 102
Approved: news@gmane.org
Message-ID: <6a3dd40c-c25c-2440-b8b5-922700a4d989@honermann.net>
References: <7da80620-e4bd-40eb-a4ec-4f3c2dcb2c98@isocpp.org>
 <1549171.TC16PSHVVd@tjmaciei-mobl1>
 <d3d99972-8135-44d0-9674-69d94141d0fb@isocpp.org>
 <2350841.Z7lUCKSumT@tjmaciei-mobl1>
 <3e64b220-79ae-4108-ba1c-9785494fc434@isocpp.org>
 <97ebfc84-c5a3-eaf5-efcb-c1bdf9b507a5@gmail.com>
 <684B5982-22CB-4357-9A1A-09F4588ADA8A@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------636D9CBDB09B259F174D748E"
X-Trace: blaine.gmane.org 1478096094 10421 195.159.176.226 (2 Nov 2016 14:14:54 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 2 Nov 2016 14:14:54 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.2.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDBNXSHG6UDBBSXJ47AAKGQEQTWWXKQ@isocpp.org Wed Nov 02 15:14:44 2016
Return-path: <std-proposals+bncBDBNXSHG6UDBBSXJ47AAKGQEQTWWXKQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f70.google.com ([209.85.214.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDBNXSHG6UDBBSXJ47AAKGQEQTWWXKQ@isocpp.org>)
	id 1c1wJE-0000BR-Sf
	for gclcip-std-proposals@m.gmane.org; Wed, 02 Nov 2016 15:14:33 +0100
Original-Received: by mail-it0-f70.google.com with SMTP id q75sf51495113itc.4
        for <gclcip-std-proposals@m.gmane.org>; Wed, 02 Nov 2016 07:14:36 -0700 (PDT)
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: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=RAwVUU29lAhvKZldm1q+aqijuZ2aGQ3+I2PahAg6T4M=;
        b=jx7kUvh3S1y9ottI2RGqhybJZjKbpJI9FF1INfhROiEiGHqqagg2TaK9h0gREeQTpz
         mRLVSWLW/LcaxHXymkuCgADdjePHrzBnlkOhN5sr9GY1MdS8FGcp413uKSw1B3rhNsNk
         ZgJIbbQ3x/JHeYpLt9HZRtUDPkY1lQUpdSU5KNnOarFHqLuwKhw9TNrhtLOQX8yTPUli
         1508TEc2HRC6Lvz9Zy0jl90rl650JZ13Rbcrtj8M87IgVQqbT57cbFyV5HM4VG0gzg+I
         JTqhmOWQ6g1x1VxJ5gil7QhFMecdC5263Bica/3x1ou4aoxHcCjksmZInj5nPUOAd707
         v8LQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-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=RAwVUU29lAhvKZldm1q+aqijuZ2aGQ3+I2PahAg6T4M=;
        b=PmJW56hZ19Y3S2WI8PYASTup5TLJzXksGy8HeO1bDRookMD13rPWHVEMRQ64fGCqWM
         q9c6M/xuK8eL72iT7YMTu9HtwXCZNh5bvGSyX/jNziIRENyACl8iwKq4tcoyjDRe/5mt
         UR4BudCnr5GZdcOEyUM9RSO4N3fIXN0ROxJHEvvkXs5c6ZWtAwvq+s4geukbbHdaldlk
         x6phRehQI7tC3zhgxOJNJqqGdEW9hsl8vOZiez7OpjOsV+GMBy7rcxnYO/MIJds4INks
         37vq+JvF13hY4ThLCDWHaT7GLQYR+AmQOdzrX8QrChz/W1UFMnDN29TSTD7kITW6Ru+S
         NgXQ==
X-Gm-Message-State: ABUngvcfbQmIELQYZKh22pT55X/Y2Eb1X02MW4IMTwUY9VdSNu6b4uzbJ7gCn2GGPI4TRQ==
X-Received: by 10.36.98.11 with SMTP id d11mr3161067itc.3.1478096075533;
        Wed, 02 Nov 2016 07:14:35 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.143.210 with SMTP id r201ls2257142iod.11.gmail; Wed, 02
 Nov 2016 07:14:34 -0700 (PDT)
X-Received: by 10.107.41.4 with SMTP id p4mr4346952iop.16.1478096073991;
        Wed, 02 Nov 2016 07:14:33 -0700 (PDT)
Original-Received: from smtp123.ord1c.emailsrvr.com (smtp123.ord1c.emailsrvr.com. [108.166.43.123])
        by mx.google.com with ESMTPS id z13si21498097itc.86.2016.11.02.07.14.33
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 02 Nov 2016 07:14:33 -0700 (PDT)
Received-SPF: neutral (google.com: 108.166.43.123 is neither permitted nor denied by best guess record for domain of tom@honermann.net) client-ip=108.166.43.123;
Original-Received: from smtp8.relay.ord1c.emailsrvr.com (localhost [127.0.0.1])
	by smtp8.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 73BC8A05C6
	for <std-proposals@isocpp.org>; Wed,  2 Nov 2016 10:14:33 -0400 (EDT)
X-Auth-ID: tom@honermann.net
Original-Received: by smtp8.relay.ord1c.emailsrvr.com (Authenticated sender: tom-AT-honermann.net) with ESMTPSA id 561DAA0565
	for <std-proposals@isocpp.org>; Wed,  2 Nov 2016 10:14:33 -0400 (EDT)
X-Sender-Id: tom@honermann.net
Original-Received: from [192.168.1.16] (pool-71-176-249-9.rcmdva.fios.verizon.net [71.176.249.9])
	(using TLSv1.2 with cipher DHE-RSA-AES128-SHA)
	by 0.0.0.0:587 (trex/5.7.7);
	Wed, 02 Nov 2016 10:14:33 -0400
In-Reply-To: <684B5982-22CB-4357-9A1A-09F4588ADA8A@gmail.com>
X-Original-Sender: tom@honermann.net
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 108.166.43.123 is neither permitted nor denied by best guess
 record for domain of tom@honermann.net) smtp.mailfrom=tom@honermann.net
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:29345
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29345>

This is a multi-part message in MIME format.
--------------636D9CBDB09B259F174D748E
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

On 11/02/2016 08:14 AM, Miro Knejp wrote:
> I think this is the real issue here: a type that is dedicated to=20
> represent only characters and not allowed to alias anything else.=20
> Having a char* can severely limit the compiler=E2=80=99s ability to optim=
ize=20
> your function because of all the aliasing implications, even if you as=20
> the author know it never aliases anything because it actually *is* a=20
> string. Having a type that clearly conveys this semantic to the=20
> compiler would be useful.

I recall this being discussed during the presentation of P0257R0=20
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0257r0.pdf> in=20
Jacksonville; thoughts were expressed that, if an alternative type to=20
accommodate aliasing needs can be popularized, then perhaps the aliasing=20
behaviors of char can be removed in some future standard.  I think that=20
is a more realistic perspective than popularizing a new type to replace=20
char.  I'll note that the char8_t type proposed in P0482R0=20
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0482r0.html>=20
for UTF-8 characters and strings would not include char's aliasing=20
behavior, thus at least allowing for more optimization possibilities for=20
UTF-8 characters/strings.

Tom.

--=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/6a3dd40c-c25c-2440-b8b5-922700a4d989%40honermann=
..net.

--------------636D9CBDB09B259F174D748E
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">On 11/02/2016 08:14 AM, Miro Knejp
      wrote:<br>
    </div>
    <blockquote
      cite=3D"mid:684B5982-22CB-4357-9A1A-09F4588ADA8A@gmail.com"
      type=3D"cite">I think this is the real issue here: a type that is
      dedicated to represent only characters and not allowed to alias
      anything else. Having a char* can severely limit the compiler=E2=80=
=99s
      ability to optimize your function because of all the aliasing
      implications, even if you as the author know it never aliases
      anything because it actually *is* a string. Having a type that
      clearly conveys this semantic to the compiler would be useful.</block=
quote>
    <br>
    I recall this being discussed during the presentation of <a
href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0257r0.pdf=
">P0257R0</a>
    in Jacksonville; thoughts were expressed that, if an alternative
    type to accommodate aliasing needs can be popularized, then perhaps
    the aliasing behaviors of char can be removed in some future
    standard.=C2=A0 I think that is a more realistic perspective than
    popularizing a new type to replace char.=C2=A0 I'll note that the char8=
_t
    type proposed in <a
href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0482r0.htm=
l">P0482R0</a>
    for UTF-8 characters and strings would not include char's aliasing
    behavior, thus at least allowing for more optimization possibilities
    for UTF-8 characters/strings.<br>
    <br>
    Tom.<br>
  </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/6a3dd40c-c25c-2440-b8b5-922700a4d989%=
40honermann.net?utm_medium=3Demail&utm_source=3Dfooter">https://groups.goog=
le.com/a/isocpp.org/d/msgid/std-proposals/6a3dd40c-c25c-2440-b8b5-922700a4d=
989%40honermann.net</a>.<br />

--------------636D9CBDB09B259F174D748E--

.
