220 5961 <CAOU91OMmaeSfANPvmJh0xnR_FGDSn9vxQWsz=8PwY4JkRMXQaw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: =?UTF-8?Q?Klaim_=2D_Jo=C3=ABl_Lamotte?= <mjklaim@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Properties Syntax
Date: Thu, 29 Aug 2013 02:06:34 +0200
Lines: 129
Approved: news@gmane.org
Message-ID: <CAOU91OMmaeSfANPvmJh0xnR_FGDSn9vxQWsz=8PwY4JkRMXQaw@mail.gmail.com>
References: <e18c3ee9-66f7-48e0-bd8b-04051c952de0@isocpp.org>
	<5e23a0e9-2bd9-4f62-aa83-47bea8144eae@isocpp.org>
	<521DAAF4.3050100@beamways.com>
	<CAFk2RUaqD5GJXhf54=T_ioc_JxLfRbPjaiV1QPVOKgV2gFk4MA@mail.gmail.com>
	<521DE3EC.4040404@beamways.com>
	<b9a92bd1-4034-4b9d-8753-a98bbfe9034a@isocpp.org>
	<CAFk2RUaixkwnekjpkG4ZnwSs3uGNbTMXZf3+Vm5MBTD-bcNqUg@mail.gmail.com>
	<521E8AB0.6070906@numericable.fr>
	<fb8c78d9-1aeb-4097-93de-3833eb243fb1@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=089e014946400e8ccd04e50ae155
X-Trace: ger.gmane.org 1377734794 12711 80.91.229.3 (29 Aug 2013 00:06:34 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 29 Aug 2013 00:06:34 +0000 (UTC)
Cc: Ville Voutilainen <ville.voutilainen@gmail.com>
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBD3NR2WQQ4IBBC5B7KIAKGQEYZZYYYY@isocpp.org Thu Aug 29 02:06:37 2013
Return-path: <std-proposals+bncBD3NR2WQQ4IBBC5B7KIAKGQEYZZYYYY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f198.google.com ([209.85.214.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBD3NR2WQQ4IBBC5B7KIAKGQEYZZYYYY@isocpp.org>)
	id 1VEpky-0003O2-Rh
	for gclcip-std-proposals@m.gmane.org; Thu, 29 Aug 2013 02:06:37 +0200
Original-Received: by mail-ob0-f198.google.com with SMTP id wc20sf26009976obb.5
        for <gclcip-std-proposals@m.gmane.org>; Wed, 28 Aug 2013 17:06:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :cc:x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=R40xEM6MWEFYUyx2v5/b3CJ2hFFUTAPUIhuCpcFlAm8=;
        b=jckdR1vEyu5Rrp0ZmfM0juH1KItX3d6Lm21awhL594gamzz+hfmt5enbGbVfwfuZB+
         3mT7m4jQr0jC/Fkt/wBHie4G9r6iPG0hryBrLBLPIke4fIe1chxsjj1cLOBpT7wyFtg4
         un1q+v1+mHs1GT6U1lCV+RZe145DWapHfeb2J4+Zl18inBHImUmqj4YkSEGxz/DdvVzI
         UByzKluQ6GLa3FoCGoA5/PiIFnlENeHjSFEz5r2oyWb69kUuEyg/I+RougwEiO0INxW/
         +Ci84qHaA4PpPxIJESvRDr7uDR0ZHhWWjtbNUcic0eXG4erUhu+0UgSmuMluzCaV5mcp
         UseQ==
X-Received: by 10.182.61.75 with SMTP id n11mr132838obr.13.1377734795763;
        Wed, 28 Aug 2013 17:06:35 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.87.229 with SMTP id bb5ls107596obb.13.gmail; Wed, 28 Aug
 2013 17:06:35 -0700 (PDT)
X-Received: by 10.60.62.101 with SMTP id x5mr359240oer.24.1377734795325;
        Wed, 28 Aug 2013 17:06:35 -0700 (PDT)
Original-Received: from mail-oa0-x234.google.com (mail-oa0-x234.google.com [2607:f8b0:4003:c02::234])
        by mx.google.com with ESMTPS id nk8si356519obb.76.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 28 Aug 2013 17:06:35 -0700 (PDT)
Received-SPF: pass (google.com: domain of mjklaim@gmail.com designates 2607:f8b0:4003:c02::234 as permitted sender) client-ip=2607:f8b0:4003:c02::234;
Original-Received: by mail-oa0-f52.google.com with SMTP id f4so8740010oah.11
        for <std-proposals@isocpp.org>; Wed, 28 Aug 2013 17:06:35 -0700 (PDT)
X-Received: by 10.60.16.104 with SMTP id f8mr7822oed.71.1377734795101; Wed, 28
 Aug 2013 17:06:35 -0700 (PDT)
Original-Received: by 10.76.27.194 with HTTP; Wed, 28 Aug 2013 17:06:34 -0700 (PDT)
In-Reply-To: <fb8c78d9-1aeb-4097-93de-3833eb243fb1@isocpp.org>
X-Original-Sender: mjklaim@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of mjklaim@gmail.com designates 2607:f8b0:4003:c02::234 as permitted
 sender) smtp.mail=mjklaim@gmail.com;       dkim=pass header.i=@gmail.com;
       dmarc=pass (p=NONE dis=NONE) d=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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:5961
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5961>

--089e014946400e8ccd04e50ae155
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Aug 29, 2013 at 1:49 AM, Nick <nicolas.jinchereau@gmail.com> wrote:

> could you clarify what you mean by non-auto property?
>

I believe Loic means that if I have a initial version of some code that
look like this:

struct K
{
    int count;
};

int f( K& k )
{
   return k.count;
}

Then (years) later I upgrade it with some checks using some property
syntax, but want to keep the retrocompatibility:

class K // another retrocompatible change
{
public:

    property int count { //* */ }

}

Assuming the property works like a public variable, then this is useful.

However, if I started my code like this, as a lot of code does:

struct K
{
    int count();
};

int f( K& k )
{
   return k.count();
}

Then there is no benefit in upgrading to properties, because it will not be
retro-compatible.

I don't have an opinion on this point. However it might point that a
property feature without
a way to implicitely use member functions like if they were properties (as
some suggested) would not use useful for code
that is already written.

It feels a bit like allowing k.count() to be written count(k) : it might
help generalization, but only with new code.


Joel Lamotte

-- 

--- 
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/.

--089e014946400e8ccd04e50ae155
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On Thu, Aug 29, 2013 at 1:49 AM, Nick <span dir=3D"ltr">&lt;<a href=3D"mail=
to:nicolas.jinchereau@gmail.com" target=3D"_blank">nicolas.jinchereau@gmail=
..com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
adding-left:1ex"><div dir=3D"ltr">could you clarify what you mean by non-au=
to property?<div>
</div></div></blockquote></div><br>I believe Loic means that if I have a in=
itial version of some code that look like this:<br><br>struct K<br>{</div><=
div class=3D"gmail_extra">=A0 =A0 int count;</div><div class=3D"gmail_extra=
">};</div>
<div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra">int f( K&am=
p; k )</div><div class=3D"gmail_extra">{</div><div class=3D"gmail_extra">=
=A0 =A0return k.count; =A0</div><div class=3D"gmail_extra">}<br><br>Then (y=
ears) later I upgrade it with some checks using some property syntax, but w=
ant to keep the retrocompatibility:<br>
<br>class K // another retrocompatible change<br>{</div><div class=3D"gmail=
_extra">public:</div><div class=3D"gmail_extra">=A0 =A0=A0</div><div class=
=3D"gmail_extra">=A0 =A0 property int count { //* */ }</div><div class=3D"g=
mail_extra"><br>
</div><div class=3D"gmail_extra">}</div><div class=3D"gmail_extra"><br></di=
v><div class=3D"gmail_extra">Assuming the property works like a public vari=
able, then this is useful.<br><br></div><div class=3D"gmail_extra">However,=
 if I started my code like this, as a lot of code does:<br>
<br><div class=3D"gmail_extra">struct K<br>{</div><div class=3D"gmail_extra=
">=A0 =A0 int count();</div><div class=3D"gmail_extra">};</div><div class=
=3D"gmail_extra"><br></div><div class=3D"gmail_extra">int f( K&amp; k )</di=
v><div class=3D"gmail_extra">
{</div><div class=3D"gmail_extra">=A0 =A0return k.count(); =A0</div><div cl=
ass=3D"gmail_extra">}<br><br>Then there is no benefit in upgrading to prope=
rties, because it will not be retro-compatible.<br><br>I don&#39;t have an =
opinion on this point. However it might point that a property feature witho=
ut<br>
a way to implicitely use member functions like if they were properties (as =
some suggested) would not use useful for code<br>that is already written.<b=
r><br>It feels a bit like allowing k.count() to be written count(k) : it mi=
ght help generalization, but only with new code.<br>
<br><br>Joel Lamotte<br><br></div></div></div>

<p></p>

-- <br />
&nbsp;<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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<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 />

--089e014946400e8ccd04e50ae155--

.
