220 33789 <994d795d-3c10-7201-8386-12f5ec7bbaae@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Matthew Woehlke <mwoehlke.floss@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: properties?
Date: Thu, 10 Aug 2017 10:40:25 -0400
Lines: 32
Approved: news@gmane.org
Message-ID: <994d795d-3c10-7201-8386-12f5ec7bbaae@gmail.com>
References: <6ed2bd55-5538-418f-8f1a-263a9958babd@isocpp.org>
 <omgfdk$pkv$1@blaine.gmane.org>
 <9979b017-fc21-445f-a1d1-0f55f8e7bf3d@isocpp.org>
 <CAFk2RUadaK3Dz_EgKMCp=UP84-VgZHtjnPaRn4yZTnADgUqgnQ@mail.gmail.com>
 <3784a92f-9045-e0e8-df9f-51a68f66ac99@gmail.com>
 <ab000071-6881-487f-b507-bcd6d656bb52@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"
X-Trace: blaine.gmane.org 1502376037 29345 195.159.176.226 (10 Aug 2017 14:40:37 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 10 Aug 2017 14:40:37 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.1
Cc: ville.voutilainen@gmail.com, bop@gmb.dk
To: std-proposals@isocpp.org, Nicol Bolas <jmckesson@gmail.com>
Original-X-From: std-proposals+bncBC37LBFWUIFBBYPAWHGAKGQECGN7IGA@isocpp.org Thu Aug 10 16:40:33 2017
Return-path: <std-proposals+bncBC37LBFWUIFBBYPAWHGAKGQECGN7IGA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f197.google.com ([209.85.161.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC37LBFWUIFBBYPAWHGAKGQECGN7IGA@isocpp.org>)
	id 1dfodQ-00076k-32
	for gclcip-std-proposals@m.gmane.org; Thu, 10 Aug 2017 16:40:28 +0200
Original-Received: by mail-yw0-f197.google.com with SMTP id f72sf13555071ywb.4
        for <gclcip-std-proposals@m.gmane.org>; Thu, 10 Aug 2017 07:40:34 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1502376034; cv=pass;
        d=google.com; s=arc-20160816;
        b=HxRiDss13l3VKEbG8fHMPqIyrviVJ9yvJd8ujgxrRRMrrRaxzPCWYuPpBWB32Up7MO
         6eF5NzseA+HhJj0qX+Qgm41tNzJSnTrzyXR8qedRl2+O9rdfFrrp0T8h1LEVhnwaBwTu
         v8qslPMuZPTz/s/1/wpYgHwDqiNFltOjwjZ0W81+iA2l4PtVZSH6rjdQqgWSHQjRrvfc
         XpKqR0UXC89vnTk8IUmWLc2T9U9VJMK4pfX0R2oB9Zmq+zdI6cmxWH9tW85apgbdWdv/
         Nkprz3kCCOfGPyok0Ae8zSgAiVkhFkViAPAcOwfe2ko/rQm4ThCMe+KCbyKtAXgEUdnK
         6Tqw==
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
         :newsgroups:cc:to:subject:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=2+S5y56MOJMNvWehjT8ipzn4NxFqS02UxCXla88ttsk=;
        b=y+UntSxhou5YsLhNsuWztGgs9cV6M1N5ScGZWoKf0po6LfLTLkoGeaqDs3OBvouJzj
         9Gkhrln8KqGb7gtIlcnqozN7w6KIG4SdrGN4QwMqs0O1b9pklZFStyVKj8OfwV8Oe9M1
         llGJbB2vy0z89BM2P0DWQQMOAd7vde+thhTW0veB+4rGh7ILWFASYZyirNth3BATn7/M
         YbUWplj60aqVz5qwydci3OdYEyBQkhJMT0867Wuzd7LEstJsZmf4MOaob79raeaUaRn8
         J8vqfEQg+wzyB8aCz9bgOEJbVd+QQ6oO5H3mhvJ7hh1A6joiubifQ0r+eLnAJHEkrJqr
      
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=NchX4ttz;
       spf=pass (google.com: domain of mwoehlke.floss@gmail.com designates 2607:f8b0:400d:c0d::244 as permitted sender) smtp.mailfrom=mwoehlke.floss@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:cc:newsgroups: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=2+S5y56MOJMNvWehjT8ipzn4NxFqS02UxCXla88ttsk=;
        b=eunv2FgpMXqiFf5LBUt1dHRgkjQrzrrS8yRe1m5n6bwpNwwnTDIdskSG2o2ga+o6cP
         U4iOblytr6zSgOX3WAeNT9BA3exXpOZDT8qp+ZyEcmE7yJkWXdl7+KrG62vaKDAWmQGu
         PEdjuKhnlI5YmhZgp1o1YxXgNDM2Yyqg+zu9AiT9aFOlOGdxwq6rUOl7I6fkbtLyHDdH
         1kfyv3y79W6B61oqmuFCvlxBL+xBt94OrAnhPNEWL9qzpZprnsFcBx9gOC6zf6W9LqFT
         o63auxRKf6DbiIDW9x0urFKd2vmqKPj9hiyTburlYdsta3EjawJCneloKwqw4I9tiXr6
         YuMA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:cc:newsgroups: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=2+S5y56MOJMNvWehjT8ipzn4NxFqS02UxCXla88ttsk=;
        b=opFZqgUle8x3lplHZefP76Z8OIA5Guz88/8dDetnt+XqnXjfqlbCm+91+K5X2vGyqw
         pfY323Lo01yb/nBPAXCa/aRSzHdAZFdIXzpRuaHbwtni5x1mz+njLlo0+ZLhscFSRFFK
         BDexjMSpNQY4JgKYSH21aIVArO1INRd0MQ7Q3c9ICtZlTuB8Emdagz/DlrywVIBqoLAk
         B6ThPLrSbvSUohqS/asfjZLQA/0JeVL+2E8I/CaSA2z/SYDY6cIDzKSmHPhcDFrdfcmf
         gbn493xMhsViLA2JFO9j2fHOgc6AcZg7Qs7Gw4Fu5omJjkq/bcvCyO4 
X-Gm-Message-State: AHYfb5hn8wpshUW2VepN5wrzgLM0QIi8nDO0vx6VlASTY58vFZU6gHlZ
	Rl8ZebqrDZ/1bg8B
X-Received: by 10.129.108.13 with SMTP id h13mr7713612ywc.0.1502376034406;
        Thu, 10 Aug 2017 07:40:34 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.172.109 with SMTP id m45ls7876385iti.11.canary-gmail; Thu,
 10 Aug 2017 07:40:33 -0700 (PDT)
X-Received: by 10.200.39.130 with SMTP id w2mr15361155qtw.244.1502376033512;
        Thu, 10 Aug 2017 07:40:33 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1502376033; cv=none;
        d=google.com; s=arc-20160816;
        b=XlS7GQFRESXP4w2VNSqVvwe/obzkywnc2DB4mg5r4noB9tJA6ep5P+6QK1bSx2zZTw
         6JDTRdnf8iVrFBqgkj1d4MStwIvZaEU6TC6ggXJs/h7QeTZEfmCmpz/jZkoZXFTyxn0F
         vn3SfGpKS1/CBn0fBHGjjoNs0jsyBDyRt6bXrg/YFgby3NRvNefaAVa2GYG8UJrti2Fn
         QKhz/3A58NkJXO0nSC+lhBWdMGoNzA4ng1i0gffptrTAQAbLX2oi621Wbmqr8gud9hGD
         VQV70OfkMEOrHaGho593KgkOHGewzZoylR3EfxDp6WwzU2enkzwQA8b9EYrV//W2n4az
         CWLg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:content-language:in-reply-to:mime-version
         :user-agent:date:message-id:from:references:newsgroups:cc:to:subject
         :dkim-signature:arc-authentication-results;
        bh=SD4vaPTwvpmKouRHEzWdosNSkhIgAWVCrPnTcByCjo0=;
        b=xCxdUkxfVYI/P8GqDA9KS7VLFcK77VHT0ySvKmq6ZFBCYcS3wzZU/19nO3U3Qy7dIf
         6uF055h/XhSE+vK3fOKR9cnMRRnP035p5XgDb4wZtJSgiPf0324Jcuaf4fIr1Ej2CY0F
         mdnFk1wj2jj54ozJ0HLd/KNOganTwmh4zEnDViv5FjV6S55fU12x4wCgnFuq+hoqIcFc
         /c0Nk++UJOWGR8KgSJuN9FJYAseUMPp+nKyo3EcAaGqI/ankoO4ZCb9bM/Fnudi+2Xw5
         k0pYXAjrqFuYcbxNsDLeJA3jFB53dJnvy9TNPl83zZqKHfc8t4TMCmaPCNPc3gX+ojtK
         6sUw==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=NchX4ttz;
       spf=pass (google.com: domain of mwoehlke.floss@gmail.com designates 2607:f8b0:400d:c0d::244 as permitted sender) smtp.mailfrom=mwoehlke.floss@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-qt0-x244.google.com (mail-qt0-x244.google.com. [2607:f8b0:400d:c0d::244])
        by mx.google.com with ESMTPS id s63si5554770qkc.214.2017.08.10.07.40.33
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 10 Aug 2017 07:40:33 -0700 (PDT)
Received-SPF: pass (google.com: domain of mwoehlke.floss@gmail.com designates 2607:f8b0:400d:c0d::244 as permitted sender) client-ip=2607:f8b0:400d:c0d::244;
Original-Received: by mail-qt0-x244.google.com with SMTP id d10so890811qtb.4
        for <std-proposals@isocpp.org>; Thu, 10 Aug 2017 07:40:33 -0700 (PDT)
X-Received: by 10.200.8.106 with SMTP id x39mr17138911qth.309.1502376033231;
        Thu, 10 Aug 2017 07:40:33 -0700 (PDT)
Original-Received: from gryphon.kitware.com (tripoint.kitware.com. [66.194.253.20])
        by smtp.googlemail.com with ESMTPSA id f187sm3510712qkb.97.2017.08.10.07.40.31
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 10 Aug 2017 07:40:32 -0700 (PDT)
Original-Newsgroups: gmane.comp.lang.c++.isocpp.proposals
In-Reply-To: <ab000071-6881-487f-b507-bcd6d656bb52@isocpp.org>
Content-Language: en-US
X-Original-Sender: mwoehlke.floss@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=NchX4ttz;       spf=pass
 (google.com: domain of mwoehlke.floss@gmail.com designates
 2607:f8b0:400d:c0d::244 as permitted sender) smtp.mailfrom=mwoehlke.floss@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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:33789
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33789>

On 2017-08-10 10:18, Nicol Bolas wrote:
> On Thursday, August 10, 2017 at 10:05:17 AM UTC-4, Matthew Woehlke wrote:
>> On 2017-08-10 02:35, Ville Voutilainen wrote: 
>>> Gee, data() could just return a reference. 
>>
>> ...which is only possible if it is okay for the user to directly assign 
>> to the underlying data member. If something non-trivial needs to happen 
>> when the property is assigned, then no, you'd need to return a proxy 
>> object. (And, alas, some_function would need to be a template.) 
> 
> Not to mention that it assumes that there is actually an object behind 
> `data()` that could be returned as a reference. Many properties are 
> phantasmal; the actual data is not stored in the type it appears as. 
> Indeed, one could say that the whole point of properties as a feature are 
> that they *can be* phantasmal in such a way, without the user being aware 
> of their nature.

....at least until someone tries to take/pass it as a reference to the
"apparent" type ;-). In a strongly-typed language like C++, that's just
insurmountable. (But I don't consider it a feature-killer.)

Applying this to bitfields was mentioned earlier in the thread...

-- 
Matthew

-- 
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 email 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/994d795d-3c10-7201-8386-12f5ec7bbaae%40gmail.com.

.
