220 39102 <HuI7FbT9Wv5a-_FWIr0Qhv9zmtfCrxYpONZ4G93vbE_K0pyko8Cri_ItEQhSio6bj6XfcssQc2UnmMTb93BpZaB1Ksw7q0GN0vS14warHAc=@miator.net> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Zhihao Yuan <zy@miator.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: RE: Concept-defined placeholder type
Date: Thu, 12 Jul 2018 03:40:56 -0400
Lines: 94
Approved: news@gmane.org
Message-ID: <HuI7FbT9Wv5a-_FWIr0Qhv9zmtfCrxYpONZ4G93vbE_K0pyko8Cri_ItEQhSio6bj6XfcssQc2UnmMTb93BpZaB1Ksw7q0GN0vS14warHAc=@miator.net>
References: <wKt6BIikQ9kr3u_mQ2oR1vvx8Uj7JLabshrk6DkzkFXpExhOUcFUc_LbGjzKQ9Z_nsrjEQrvTE5d7-8FgpX_Q-dyOVcAUaiZdsCZZsX0ctQ=@miator.net>
 <0fe92570-1bc7-4a8b-aaf4-b272950f20af@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1531381139 32381 195.159.176.226 (12 Jul 2018 07:38:59 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 12 Jul 2018 07:38:59 +0000 (UTC)
To: 'Nicol Bolas' <jmckesson@gmail.com>, 'ISO C++ Standard - Future Proposals' <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCSKRWMD4EHBBD4MTTNAKGQEIJQ4VNQ@isocpp.org Thu Jul 12 09:38:54 2018
Return-path: <std-proposals+bncBCSKRWMD4EHBBD4MTTNAKGQEIJQ4VNQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f72.google.com ([74.125.82.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCSKRWMD4EHBBD4MTTNAKGQEIJQ4VNQ@isocpp.org>)
	id 1fdWBh-0008KG-BO
	for gclcip-std-proposals@m.gmane.org; Thu, 12 Jul 2018 09:38:53 +0200
Original-Received: by mail-wm0-f72.google.com with SMTP id f13-v6sf3491251wmb.4
        for <gclcip-std-proposals@m.gmane.org>; Thu, 12 Jul 2018 00:41:04 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1531381264; cv=pass;
        d=google.com; s=arc-20160816;
        b=bOWCAlOERz2vtI9UfoM8wmCzxA9BZAE2pybtzuXfXwKUO8qp00BzwKTghmeTIiKH7/
         1kD8XjRVJMr7AQAR7JXhYFRNd4ouYRPlMRqxgibcPH88rUXItAbZTGg9zcaDnPaN0RUu
         A3l/xP/dFjx1tOs5xrgRv8xy8DdBFphKBF32Kl1+G7xj2WkfMq0zUs5udfgb3oVDSsuB
         MgMSn2mmZueVM/EO7fSktFIsCsUBTH8XuiNNx70aSvf4ed+Wzw76SEss43blCXtWRYwE
         lJoDriwTx5+1p4FoJ9RRjY29rExN4YKF23oZ9vs7dxjyZPzRTIwzoVvnyD7Neh5GeHWF
         1aDQ==
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:content-transfer-encoding
         :mime-version:feedback-id:references:in-reply-to:message-id:subject
         :reply-to:from:to:date:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=l6QBFiYjRXL05mqb6O5Z4/Dqp3BztNJ2FMk80i6wNYA=;
        b=s6v3Wh+iQKNE13R2/64bi7vI+2plYNS/uz/atCnhlYK0Z2P0g3B6V3qKidJsbGMBjQ
         5EKfk0oA0aeC5tZTV+aFnpCVtXw0mPaaVh48iBSXq5cAwGNFX14f5e1thq9SH9MKGvZS
         Uv9EQjUiOvRdOOk20brOW6mzQPeCIdGVRXo3/EKPXIC0wlYgtiVHn/V4IcgVWLxC+o6F
         5Ln6h+1HvecrNuq43PfWx4TB4u4ptMiTHWMinW21TT9LqrFB+s9UAU5d6HIAp/GkrbHk
         Mdn1HK0EMHQtUoPvt4Ed/00LnRof3i5ovue8T5yciBPziikbTxFmye9Ihp5i/BttKUp6
          
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@miator.net header.s=protonmail header.b=dQqY4MEG;
       spf=pass (google.com: domain of zy@miator.net designates 185.70.40.132 as permitted sender) smtp.mailfrom=zy@miator.net
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:to:from:reply-to:subject:message-id:in-reply-to:references
         :feedback-id:mime-version:content-transfer-encoding
         :x-original-sender:x-original-authentication-results:precedence
         :mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=l6QBFiYjRXL05mqb6O5Z4/Dqp3BztNJ2FMk80i6wNYA=;
        b=osWOg9SfmPrxwwD1kSWFTI+AZjXhlmlBkbDJ00SYA7qbwFnh/942lBNYLtcRHxNyeL
         1H7X2biJfRNy6HkkmiwJMnvWXbOXGEtpdTyzed1pbbwnJi0Yg6uRXjx7iaBKW7ZpZg7W
         wA7alxqJuLLr9gJLD8ci8LyTUmgIVDOYKUCsN2gerXW3UfT0x+wAWAyR+PllVJvCqN1w
         pT0G6kZIODpURjrNwcHYuhGIvZ36bai33f+q64E/Tv6DYARquzQfgAY2SoKxQZ8EqFUS
         VX1dCY7pxx/qTHPFTe2SnERBf8K6iWqMP4MMXkXuGxUmtR+VZqIxP5ym5xLBAfQiGSWU
         6wVA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:to:from:reply-to:subject:message-id
         :in-reply-to:references:feedback-id:mime-version
         :content-transfer-encoding:x-original-sender
         :x-original-authentication-results:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=l6QBFiYjRXL05mqb6O5Z4/Dqp3BztNJ2FMk80i6wNYA=;
        b=fjrDFcr0bEQwc7OsIQvQMjVnBNFVm+e9/otcIpuobTRgfizrOxwqA3vM187tbVwkee
         vjp/ApoDdBtv1RItgmT+i+JRBwaqQVUtSL+vJJIvJKNgH/hFfYeqhU9hQwClEgfzmJ/p
         MOgMLeZQboKzma1unnAGML7aKW4WiezUGFvbeP3uRauot7+ToQFuxQf4fz2iRRTvBGix
         DQ6gxRabRzF+YWXXSUkHwAOPao/LKXsNcUDw3pHH/nRbjUrV7JT/XgjM2miyNoNmoyei
         mM4Q95zlX5XuoLkIzel4dZ8HtGFU9uSvG1bEoqqzVEWQahSJYUfRvEhrr0j 
X-Gm-Message-State: AOUpUlE4mCeLCTn8DAA9HpSChIMS6sjnNEH4DETfk1Yp0e2+xbPl9SxR
	Hyudk8ajy7vyBVqFVdRN1xzm2A==
X-Google-Smtp-Source: AAOMgpegBTQc0eZmlTkjrvWYlBUEmJmciZkHzYn30UifzVecRnxsBXQBrOcRPdOQwBh02NEs328R2Q==
X-Received: by 2002:adf:c58d:: with SMTP id m13-v6mr95194wrg.9.1531381264353;
        Thu, 12 Jul 2018 00:41:04 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:adf:e60f:: with SMTP id p15-v6ls3236299wrm.14.gmail; Thu, 12
 Jul 2018 00:41:03 -0700 (PDT)
X-Received: by 2002:adf:c354:: with SMTP id e20-v6mr782783wrg.257.1531381263318;
        Thu, 12 Jul 2018 00:41:03 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1531381263; cv=none;
        d=google.com; s=arc-20160816;
        b=nLy/h6XLlr0kSpXZPkaMk40C9ZCkLm5fS2qlvqcIBAW2iWJZuXEiJEIyyyj6/+pz55
         e4NjfY22YbOLqiArikDBuDAi0VQzJ0c23tX53s7FBZKQKwE812anC1Cf4AHWnZV+JL52
         twe2t/ai7Dh2z252l7W0EavgQ9PDGOriW4XgjoKVM+G1xUuSGoehi90Um1nDoodrBNF4
         8VaIx2m1cPldIqy8c5GUPzVecN9SFH9WA8LlbrjdkCIuo2yZrndPpL5Or/l3Rd6+G1AM
         0zJzTY0XMKsAzxYRORJnBFUTBsy4SGlADbHaFtMqS+1All75u7+K0ySWIEUp8RpfxViH
         9+qQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:feedback-id:references
         :in-reply-to:message-id:subject:reply-to:from:to:dkim-signature:date
         :arc-authentication-results;
        bh=b6W+e7kjNcUCmFQiEtt5AeJsN3DCMTdFqxUOG/iL/eM=;
        b=Lh4llqKqjpEAFR5Ck1NQo+w4x5+LFgtczR4dVmQ61oNPq49MYVavfrCck2bK1sjSVN
         jL/uc+ExB8CD5JZWkkSRNRmCFWRy7+vlKt5FjcjTE8D4MgT+ExtIJ6naBQD0xF1O8Uru
         z3j/pLDGj7t67VPyxs4dQucqbDJq1SvQU4ivV+3TOpXQpPYfhmZZFJbB+SLxFTMouZHb
         Ia/2JEqVta+5XO7tfYsVHTe3mhm1TV0DWGXKft9vEWWtVAHkFbppHMMBGJ3iZ/P1BoHJ
         E9fdEZ3aRB7N/w6JH+JFJmyGgGkrLYMeMdIqNSZQj5e86wNdmqBfGeJVn8nq4nD65fnr
         fihg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@miator.net header.s=protonmail header.b=dQqY4MEG;
       spf=pass (google.com: domain of zy@miator.net designates 185.70.40.132 as permitted sender) smtp.mailfrom=zy@miator.net
Original-Received: from mail-1857040132.protonmail.ch (mail-1857040132.protonmail.ch. [185.70.40.132])
        by mx.google.com with ESMTPS id i10-v6si19199216wrh.196.2018.07.12.00.41.03
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 12 Jul 2018 00:41:03 -0700 (PDT)
Received-SPF: pass (google.com: domain of zy@miator.net designates 185.70.40.132 as permitted sender) client-ip=185.70.40.132;
In-Reply-To: <0fe92570-1bc7-4a8b-aaf4-b272950f20af@isocpp.org>
Feedback-ID: xu1i2ADzKwGyrUl8KbXpsa1PQSI0Bc21qlX1V7gpMylRDQPR42YBpWcLHW4brubvCmGM18xDo5tgsD-vWFu_cQ==:Ext:ProtonMail
X-Original-Sender: zy@miator.net
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@miator.net header.s=protonmail header.b=dQqY4MEG;       spf=pass
 (google.com: domain of zy@miator.net designates 185.70.40.132 as permitted
 sender) smtp.mailfrom=zy@miator.net
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:39102
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/39102>

From: Nicol Bolas <jmckesson@gmail.com>=20
Sent: Thursday, July 12, 2018 12:25 AM
> This construct isn't even "conceptually" a placeholder type. Why? Because=
 you don't have to deduce its type via template argument deduction. You can=
 just call the function with an explicit template parameter. No deduction w=
ill take place, since you explicitly provided the type.
>=20
> I know you're trying to make an analogy between template parameters and y=
our feature. But that analogy simply doesn't match reality. Your feature is=
, in the end, quite distinct from a template parameter.

Based on your logic, does the analog matches reality
if we allow

      Copyable T;
      using T =3D char;

assigning a type directly to the constrained-type-name
without deduction?  I would say these are all additional
functionalities regarding "something" in place of a type
which can be deduced.  These functionalities do not
change the entities' nature.

> Despite the fact that your proposal references P0915 directly, your propo=
sal is written as if in a vacuum. That is, it's written as if there are no =
competing proposals within this design space at all.

We are not actually competing.  Take Concept TS for
example,

     Copyable T;
     T x =3D foo();
     Copyable x =3D foo();

strictly speaking, they can coexist.  Adding an 'auto'
can also be justified.  I can mention some of those
papers, but I haven't decided which form... Thanks
for the review.

> Retroactive compile errors:
>=20
> SomeConcept T;
> static_assert(sizeof(T) > 4);
> T t =3D 'c';
>=20
> I'm not saying its unimplementable. [...]

If implementors says no then it's no, I just feel this
model is easier to understand (you declared
something, then its interpretation follows the same
rule on every line that can lookup the thing you
declared).

> Your syntax forces me to create a typename even if I don't want one.

We don't have enough C++20 code to tell whether
this is a real issue.  I can raise a hypophysis saying
"repeated constraints happens frequently:"

    Iterator T;
    T a =3D begin(...);
    // ...
    T ed =3D find(...);

and we don't have data to disprove that either.
After we have the data, it's not too late to adjust
designs.  Meanwhile, other designs cannot extend
to support constraining two variables that are
"EqualityComparable" afaict.

> Even worse, if I don't want to constrain a deduced variable,

  template <class T> concept Any =3D true;
  Any T;
  T a =3D ...;

--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
_______________________________________________



--=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/HuI7FbT9Wv5a-_FWIr0Qhv9zmtfCrxYpONZ4G93vbE_K0pyk=
o8Cri_ItEQhSio6bj6XfcssQc2UnmMTb93BpZaB1Ksw7q0GN0vS14warHAc%3D%40miator.net=
..

.
