220 27897 <36958399-1282-4cef-a12b-0439e176aeda@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: FrankHB1989 <frankhb1989@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Stabilize the numeric types in all platforms
Date: Tue, 23 Aug 2016 04:31:20 -0700 (PDT)
Lines: 159
Approved: news@gmane.org
Message-ID: <36958399-1282-4cef-a12b-0439e176aeda@isocpp.org>
References: <e10aed06-1df7-495b-93a2-10315cede76c@isocpp.org> <72b7e733-cb85-4f47-a09b-10611f04211b@isocpp.org> <18a39611-8088-4e04-be0a-bb1b7c485683@isocpp.org>
 <1706311.trY4MaExHO@tjmaciei-mobl1>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1765_82022597.1471951880486"
X-Trace: blaine.gmane.org 1471951890 20906 195.159.176.226 (23 Aug 2016 11:31:30 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 23 Aug 2016 11:31:30 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCTJVBPG3QIBBCXI6C6QKGQEPBMFKOQ@isocpp.org Tue Aug 23 13:31:24 2016
Return-path: <std-proposals+bncBCTJVBPG3QIBBCXI6C6QKGQEPBMFKOQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f199.google.com ([209.85.161.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCTJVBPG3QIBBCXI6C6QKGQEPBMFKOQ@isocpp.org>)
	id 1bc9vP-00051O-KR
	for gclcip-std-proposals@m.gmane.org; Tue, 23 Aug 2016 13:31:23 +0200
Original-Received: by mail-yw0-f199.google.com with SMTP id j12sf215561431ywb.3
        for <gclcip-std-proposals@m.gmane.org>; Tue, 23 Aug 2016 04:31:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=ZJ3JZIa3rvD9QlJi4+eiCSxM1cdKQa+2uOcMoLuVcpw=;
        b=JpNfJVvINF1Xb2anVK0NBUIKKO8tTPaGoQEeXxiuxkt5++QOQ8KY6DDHaP540bjrWz
         lC5+1d/cr3Vv4TqwlJwrteRurasPhqOSkWpXmZSvRNt0/IlWrWcr84MPpL4g+9otuVji
         i/9LoC4j+MS+VyuAg7Mayl2fIkWi+RwDVSEHFX24/d1vwIXI2dCNMOcMEqMHAaivUZ5G
         qEWdP6XzQYkp8KGpHKXpmGRQwFR7ajAMWaY5jeAfVe8hvVPBn0DOAYZ/GofptFYcsm3V
         QVA+nQL0KOAsTt+YuGX68C2o4q6/90QtBGs+ip1L4YqCzlVhhPnplfXg69tNjaymjenL
         67ow==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=ZJ3JZIa3rvD9QlJi4+eiCSxM1cdKQa+2uOcMoLuVcpw=;
        b=mC/wNVb7y33j7uDvG28j+XuF9ZK+oVO7jumr87o+U+UGzY3Xb65EUbq/DG2ysIBd1C
         A6I5enRIcqAGXglm0ZxYyO93XcrsovhdxjyXwM+pxWzLzBOcIw9IrvH/PUYG3zq5t0L1
         0psGlV9F00uIRlZcQo6NXCD1Zbw2WPX7k8lV8wJI21HbTfbnkqJvC4hhaEsjXNk3smcn
         w54uJ1unzW6yqpM6GunEKsektIyLUK14BebLZDioqImOmhYi4uoLd18xCi8S4I7yt84y
         CrcGJTwX1pvIMW9ki2BnnOoMkb4O3MqSKYELsVcP9BaIfZKbWj7V+IfUCRtsgscEYnJr
         q6AQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=ZJ3JZIa3rvD9QlJi4+eiCSxM1cdKQa+2uOcMoLuVcpw=;
        b=D47XAa6jonTC0lx7PjUKS0Sc94f1QupY/gnH/6a9QJha34WpX8hA/e1SHZtd/7DVRb
         PA+T1YyUm+lnVf5AWcg4MVOe6jvBTD/Sh8/gKXCy8pV5Sjg/CCNBVqVRUm6/jbCkg0Qz
         U2oA/WGkaKRZhy76jXLhPzvvO5kSIdj2gNPgWREnvSuENOSdvWHpThsKlFfgg3oyhJWj
         uUbv02PSoeJNyEnQD/iBJ78E5sIAXZkVdfDLXigW+nu6noqlCOcr6sn9GXT5MD+w7X5r
         XTkw46u4DNOYP32m9frXU9HmOdj+FcD4fXyupYdpycP3CtfLANAzDplYc5z6cJ73TLz+
         ZPbw==
X-Gm-Message-State: AEkoouuMz/B3ZfQZksmDtRdwgomZxvKmMe5Cf7AXqoLRa3H4LRFQsALwIri40MFIFoSQVg==
X-Received: by 10.129.159.210 with SMTP id w201mr20523405ywg.44.1471951884118;
        Tue, 23 Aug 2016 04:31:24 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.41.80 with SMTP id p77ls4831283itp.4.gmail; Tue, 23 Aug
 2016 04:31:22 -0700 (PDT)
X-Received: by 10.36.111.147 with SMTP id x141mr814680itb.6.1471951881300;
        Tue, 23 Aug 2016 04:31:21 -0700 (PDT)
In-Reply-To: <1706311.trY4MaExHO@tjmaciei-mobl1>
X-Original-Sender: frankhb1989@gmail.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:27897
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/27897>

------=_Part_1765_82022597.1471951880486
Content-Type: multipart/alternative; 
	boundary="----=_Part_1766_1879929115.1471951880486"

------=_Part_1766_1879929115.1471951880486
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



=E5=9C=A8 2016=E5=B9=B48=E6=9C=8823=E6=97=A5=E6=98=9F=E6=9C=9F=E4=BA=8C UTC=
+8=E4=B8=8B=E5=8D=8812:49:54=EF=BC=8CThiago Macieira=E5=86=99=E9=81=93=EF=
=BC=9A
>
> On segunda-feira, 22 de agosto de 2016 21:36:12 PDT FrankHB1989 wrote:=20
> > OK, I should have said, they are not mandated *by the core language*,=
=20
> or,=20
> > not guaranteed both built-in and portable.=20
>
> They are mandated in a header that complements the core language. Just=20
> like=20
> <intializer_list>, <type_traits> and <limits>, those types cannot be=20
> implemented by anyone except the compiler vendor.=20
>
> Therefore, for all intents and purposes, the minimum-width and fast=20
> integer=20
> types are guaranteed to be portable.=20
>
> The exact-width ones aren't guaranteed to be portable because their=20
> concept=20
> isn't portable. Some machines don't have 8-, 16-, 32- and 64-bit types=20
> (they=20
> could be multiples of 9 bits). Also note how int32_t is required to use=
=20
> two's=20
> complement representation, which again excludes some machines.=20
>
> Good point about 2's complements. However, all of these are what I have=
=20
already known. I still wonder why these (at least partially) width-aware=20
types are not in the core language while traditional fundamental integer=20
types are still in it. In a systemic view of design, this is an=20
inappropriate inversion of abstraction layers -- all implementations in=20
reality build these fundamental types on some integer types with known=20
width provided by underlying specification, or just with the width=20
specified artificially. Since we always will have some exact width integers=
=20
in the stacks of implementation, why not lift the uncertainty to the higher=
=20
level? Though I don't think declaring `short` or `long` by users very=20
useful, but it gives us an opportunity to have the core language cleaner,=
=20
with less confusion, meeting better to the principle of zero-cost=20
abstraction mentally, and being a little easier to implement.
Or perhaps better keeping them all out of the core language?


--=20
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org=20
>    Software Architect - Intel Open Source Technology Center=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/36958399-1282-4cef-a12b-0439e176aeda%40isocpp.or=
g.

------=_Part_1766_1879929115.1471951880486
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>=E5=9C=A8 2016=E5=B9=B48=E6=9C=8823=E6=97=A5=E6=98=
=9F=E6=9C=9F=E4=BA=8C UTC+8=E4=B8=8B=E5=8D=8812:49:54=EF=BC=8CThiago Maciei=
ra=E5=86=99=E9=81=93=EF=BC=9A<blockquote class=3D"gmail_quote" style=3D"mar=
gin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">O=
n segunda-feira, 22 de agosto de 2016 21:36:12 PDT FrankHB1989 wrote:
<br>&gt; OK, I should have said, they are not mandated *by the core languag=
e*, or,=20
<br>&gt; not guaranteed both built-in and portable.
<br>
<br>They are mandated in a header that complements the core language. Just =
like=20
<br>&lt;intializer_list&gt;, &lt;type_traits&gt; and &lt;limits&gt;, those =
types cannot be=20
<br>implemented by anyone except the compiler vendor.
<br>
<br>Therefore, for all intents and purposes, the minimum-width and fast int=
eger=20
<br>types are guaranteed to be portable.
<br>
<br>The exact-width ones aren&#39;t guaranteed to be portable because their=
 concept=20
<br>isn&#39;t portable. Some machines don&#39;t have 8-, 16-, 32- and 64-bi=
t types (they=20
<br>could be multiples of 9 bits). Also note how int32_t is required to use=
 two&#39;s=20
<br>complement representation, which again excludes some machines.
<br>
<br></blockquote><div>Good point about 2&#39;s complements. However, all of=
 these are what I have already known. I still wonder why these (at least pa=
rtially) width-aware types are not in the core language while traditional f=
undamental integer types are still in it. In a <span class=3D"op_dict3_font=
24 op_dict3_marginRight">systemic view of design, this is an inappropriate =
inversion of abstraction layers -- all implementations in reality build the=
se fundamental types on some integer types with known width provided by und=
erlying specification, or just with the width specified artificially. Since=
 we always will have some exact width integers in the stacks of implementat=
ion, why not lift the uncertainty to the higher level? Though I don&#39;t t=
hink declaring `short` or `long` by users very useful, but it gives us an o=
pportunity to have the core language cleaner, with less confusion, meeting =
better to the principle of zero-cost abstraction mentally, and being a litt=
le easier to implement.<br>Or perhaps better keeping them all out of the co=
re language?<br><br><br></span></div><blockquote class=3D"gmail_quote" styl=
e=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left:=
 1ex;">--=20
<br>Thiago Macieira - thiago (AT) <a href=3D"http://macieira.info" target=
=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;http://www.goo=
gle.com/url?q\x3dhttp%3A%2F%2Fmacieira.info\x26sa\x3dD\x26sntz\x3d1\x26usg\=
x3dAFQjCNEswDUBNCNanbu7euhqLn_62FW8ag&#39;;return true;" onclick=3D"this.hr=
ef=3D&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fmacieira.info\x26sa\x=
3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEswDUBNCNanbu7euhqLn_62FW8ag&#39;;return t=
rue;">macieira.info</a> - thiago (AT) <a href=3D"http://kde.org" target=3D"=
_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;http://www.google.=
com/url?q\x3dhttp%3A%2F%2Fkde.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH=
GRJdo5_JYG1DowztwAHAKs80XSA&#39;;return true;" onclick=3D"this.href=3D&#39;=
http://www.google.com/url?q\x3dhttp%3A%2F%2Fkde.org\x26sa\x3dD\x26sntz\x3d1=
\x26usg\x3dAFQjCNHGRJdo5_JYG1DowztwAHAKs80XSA&#39;;return true;">kde.org</a=
>
<br>=C2=A0 =C2=A0Software Architect - Intel Open Source Technology Center
<br>
<br></blockquote></div>

<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/36958399-1282-4cef-a12b-0439e176aeda%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/36958399-1282-4cef-a12b-0439e176aeda=
%40isocpp.org</a>.<br />

------=_Part_1766_1879929115.1471951880486--

------=_Part_1765_82022597.1471951880486--

.
