220 17709 <8ac58c5d-6542-43ff-b42c-b58cbf16be6d@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: =?UTF-8?Q?=5Bstd=2Dproposals=5D_Re=3A_Proposal=3A_Class_static_=E2=80=9Cproper?=
	=?UTF-8?Q?ty=E2=80=9D_constants_in_vtables?=
Date: Tue, 5 May 2015 13:57:32 -0700 (PDT)
Lines: 89
Approved: news@gmane.org
Message-ID: <8ac58c5d-6542-43ff-b42c-b58cbf16be6d@isocpp.org>
References: <49c358a2-d19a-415f-a4fa-1ff67286a0ad@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1032_2023941338.1430859452314"
X-Trace: ger.gmane.org 1430859456 12523 80.91.229.3 (5 May 2015 20:57:36 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 5 May 2015 20:57:36 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBPO5USVAKGQEJORGJZA@isocpp.org Tue May 05 22:57:36 2015
Return-path: <std-proposals+bncBCEKFTV6ZUMBBPO5USVAKGQEJORGJZA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qc0-f197.google.com ([209.85.216.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBPO5USVAKGQEJORGJZA@isocpp.org>)
	id 1YpjuI-0003Fw-Je
	for gclcip-std-proposals@m.gmane.org; Tue, 05 May 2015 22:57:35 +0200
Original-Received: by qcbmu5 with SMTP id mu5sf93310244qcb.0
        for <gclcip-std-proposals@m.gmane.org>; Tue, 05 May 2015 13:57:33 -0700 (PDT)
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
         :content-type:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=2hhO0h4ejr3f33LQBDXWoDgRwcssiBCT1/ug+Dokths=;
        b=Cq1fGwHvrUFqbygXA2JxQcnKyYnXvsqQvhy9UewKLKJbRW7u3ziG3fypW+tc5ZlOjw
         jl7YEfpyaZAzKp7hcyY4fCro3mqEzPgwPs5E13TT688CRHxIVu1z6b/jysd17pfNxBDV
         n7YLkjUf/cYbmieL7og46lEzK/nq1lo5z+tWurCQo225MdVluAKh0ZEAWrybZzryfxgt
         V7K7SMb8N8qrhF6swNjjkgk2t2YHaM45K4tFM6LNHmO9/6qkkkzwDyPP7GY0hYBQAYnK
         vcSByd7NGJAd6YxTmnATgP1axnrIl32VzuFiOLRFv3ejvUZL3TZdXkb2FaXjwpWNCXF7
         Ugqg==
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:content-type:x-original-sender:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=2hhO0h4ejr3f33LQBDXWoDgRwcssiBCT1/ug+Dokths=;
        b=PlpqnpY3L9mzrDibKmDm1GNn3SStuxXB8G6dGXqPZbShpgXyQLJyWyKzHefsdfieH+
         cAj4UreNzAWZo2ihAcJ3Fj+nWh1b2PiTJ5hAg9bS/PgPpzJ1OQBp9Fmdf6ujQ7W6H7be
         tePgtdZY2xxSjxWn/Q4NPmOFYJKyYGeo9jjq9oUT5rRSljAIcg/puh8On7KHbQHVoPQk
         t1TXonskqSstq9qvYNMldQbjwv5l336Zo/2b9VbB9Z26hkkooXGaOTcVNsEsgxdJyCe7
         iJTJS72UXDnQZcTYdBxhcsNR57Ru9UsHzACdk0SJYOHbNpW6OWaWaWuoqtS4XSO/dCx1
         mr0Q==
X-Gm-Message-State: ALoCoQkA+bYPG2UMUwH1No4VBdqFFPQfcDjM6i36Df5ovUHBRgWzdX2WWwr6Cw56izBr+qR9fbw1
X-Received: by 10.236.45.98 with SMTP id o62mr43657696yhb.42.1430859453654;
        Tue, 05 May 2015 13:57:33 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.86.231 with SMTP id p94ls3273329qgd.35.gmail; Tue, 05 May
 2015 13:57:33 -0700 (PDT)
X-Received: by 10.140.31.196 with SMTP id f62mr335959qgf.30.1430859453036;
        Tue, 05 May 2015 13:57:33 -0700 (PDT)
In-Reply-To: <49c358a2-d19a-415f-a4fa-1ff67286a0ad@isocpp.org>
X-Original-Sender: jmckesson@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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:17709
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/17709>

------=_Part_1032_2023941338.1430859452314
Content-Type: multipart/alternative; 
	boundary="----=_Part_1033_241099286.1430859452314"

------=_Part_1033_241099286.1430859452314
Content-Type: text/plain; charset=UTF-8

On Tuesday, May 5, 2015 at 12:21:24 PM UTC-4, John Yates wrote:
>
> I have been writing embedded systems in C++ for nearly 20 years.  
> Repeatedly I have encountered a desire to access class properties more 
> cheaply that via a call to a virtual method.  This seems (at least to me) a 
> very natural extension of C++ storage specifiers and the semantics of 
> virtual name lookup.  I have finally  gotten around to writing a brief 
> proposal 
> <https://docs.google.com/document/d/1Y0_MG7MgoUDHGQGh4IZcAWRRO9I4Xy-WjwgQe19iT1g/edit?usp=sharing>. 
>  Very curious what other may think.
>

My concern with this proposal is that it formalizes and promotes the use of 
ad-hoc methods of OOP. While it is true that many people want to use such 
methods, to standardize it would suggest that it's a good thing. Which by 
inference implies that there's something wrong with virtual dispatch.

Also, I'd say that derived class versions of these static members *must* 
use the `override` keyword, to make it clear that they're overriding a 
previously defined virtual, rather than creating a regular new static 
member.

Lastly, don't call them "properties". It gives the wrong impression; people 
might start thinking of C# properties.

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_1033_241099286.1430859452314
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tuesday, May 5, 2015 at 12:21:24 PM UTC-4, John Yates w=
rote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8e=
x;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><span st=
yle=3D"font-family:arial,sans-serif;font-size:small">I have been writing em=
bedded systems in C++ for nearly 20 years.&nbsp; Repeatedly I have encounte=
red a desire to access class properties more cheaply that via a call to a v=
irtual method. &nbsp;This seems (at least to me) a very natural extension o=
f C++ storage specifiers and the semantics of virtual name lookup. &nbsp;I =
have finally &nbsp;gotten around to writing a <a href=3D"https://docs.googl=
e.com/document/d/1Y0_MG7MgoUDHGQGh4IZcAWRRO9I4Xy-WjwgQe19iT1g/edit?usp=3Dsh=
aring" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'https=
://docs.google.com/document/d/1Y0_MG7MgoUDHGQGh4IZcAWRRO9I4Xy-WjwgQe19iT1g/=
edit?usp\75sharing';return true;" onclick=3D"this.href=3D'https://docs.goog=
le.com/document/d/1Y0_MG7MgoUDHGQGh4IZcAWRRO9I4Xy-WjwgQe19iT1g/edit?usp\75s=
haring';return true;">brief proposal</a>. &nbsp;Very curious what other may=
 think.</span><br></div></blockquote><div><br>My concern with this proposal=
 is that it formalizes and promotes the use of ad-hoc methods of OOP. While=
 it is true that many people want to use such methods, to standardize it wo=
uld suggest that it's a good thing. Which by inference implies that there's=
 something wrong with virtual dispatch.<br><br>Also, I'd say that derived c=
lass versions of these static members <i>must</i> use the `override` keywor=
d, to make it clear that they're overriding a previously defined virtual, r=
ather than creating a regular new static member.<br><br>Lastly, don't call =
them "properties". It gives the wrong impression; people might start thinki=
ng of C# properties.<br></div></div>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_1033_241099286.1430859452314--
------=_Part_1032_2023941338.1430859452314--

.
