220 6087 <f7ffbfd6-432a-4d1e-82e9-dd76da05750a@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: David Krauss <potswa@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Templates usage with *this
Date: Sun, 1 Sep 2013 22:55:54 -0700 (PDT)
Lines: 69
Approved: news@gmane.org
Message-ID: <f7ffbfd6-432a-4d1e-82e9-dd76da05750a@isocpp.org>
References: <e0049c1d-1b02-42bc-a871-2f5749572c41@isocpp.org>
 <e41ce277-f6f9-4dbe-92f7-dc8510efb6d3@isocpp.org>
 <c354d976-77e3-47a3-ac8c-6a3b0ea15bbf@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_170_32877432.1378101354166"
X-Trace: ger.gmane.org 1378101353 11658 80.91.229.3 (2 Sep 2013 05:55:53 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 2 Sep 2013 05:55:53 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCW25A7E3QCRB26QSCIQKGQE2BORQWY@isocpp.org Mon Sep 02 07:55:57 2013
Return-path: <std-proposals+bncBCW25A7E3QCRB26QSCIQKGQE2BORQWY@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+bncBCW25A7E3QCRB26QSCIQKGQE2BORQWY@isocpp.org>)
	id 1VGN7E-0000B9-PO
	for gclcip-std-proposals@m.gmane.org; Mon, 02 Sep 2013 07:55:57 +0200
Original-Received: by mail-ob0-f198.google.com with SMTP id wc20sf16716184obb.5
        for <gclcip-std-proposals@m.gmane.org>; Sun, 01 Sep 2013 22:55:55 -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
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=GwocB7TfUI2wqanv+bqlgYLLFGvVYsiJ4UAYt64rbeY=;
        b=ibQThg1jN63yNVOtoLbdocBVsbDgd6KZ/mRBiTlFpGB8Q1YoK2FxTfA4kZ9qVzOxMU
         gTSA7/OvGcruWvYLq7yKxrB11ebrhooD2io63I1Pv5aRpT0G1HJtc1718Dp1owuoEwi6
         5vj6ceQ0NSIU/WH2RFW0xTU2W/cU6RQ+hhRX1PwE6i4eTfApsAO5Kr03XGJ5piUsBGgu
         Tik0A5QDmiNEiI2l/zawt4e2ErKz84XkxKBvzSKg9AtlQDfLoi0fPl03qrYqzcb58i5Q
         7JJZaSKw+hjQYUzQSiHPOQlS7pSsyPw3hBgvM76JTSr/0RKAMYjG6tiS9/vyyJ6V1jL0
         LT3g==
X-Received: by 10.42.253.74 with SMTP id mz10mr11877509icb.28.1378101355707;
        Sun, 01 Sep 2013 22:55:55 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.50.141 with SMTP id c13ls1457812igo.18.canary; Sun, 01 Sep
 2013 22:55:55 -0700 (PDT)
X-Received: by 10.50.73.132 with SMTP id l4mr532055igv.0.1378101355231;
        Sun, 01 Sep 2013 22:55:55 -0700 (PDT)
In-Reply-To: <c354d976-77e3-47a3-ac8c-6a3b0ea15bbf@isocpp.org>
X-Original-Sender: potswa@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:6087
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/6087>

------=_Part_170_32877432.1378101354166
Content-Type: text/plain; charset=ISO-8859-1



On Sunday, September 1, 2013 3:23:44 PM UTC+8, Artyom Lebedev wrote:
>
> Standard disclaimer: accessor functions are evil. C++ has a perfectly good 
>> model for accessing members; do not roll your own unless you legitimately 
>> have a custom object model.
>>
> Probably you a bit misunderstood the idea. It by no means related to 
> accessor functions.
>

I don't object to accessors unless they're gratuitous. There are use cases 
and hence this is the disclaimer is an afterthought. Maurice mentions 
variant above.

But do note that there is never an actual need to repeat the algorithm in 
the various overloads, as my example demonstrates. If the friend function 
is an unpalatable interface, the member overloads to call it will always be 
only one line each.

-- 

--- 
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_170_32877432.1378101354166
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Sunday, September 1, 2013 3:23:44 PM UTC+8, Art=
yom Lebedev wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;marg=
in-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"=
ltr"><blockquote style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex" class=3D"gmail_quote">Standard disclaimer:=
 accessor functions are evil. C++ has a perfectly=20
good model for accessing members; do not roll your own unless you=20
legitimately have a custom object model.<br></blockquote><div>Probably you =
a bit misunderstood the idea. It by no means related to accessor functions.=
</div></div></blockquote><div><br>I don't object to accessors unless they'r=
e gratuitous. There are use cases and hence this is the disclaimer is an af=
terthought. Maurice mentions <span style=3D"font-family: courier new,monosp=
ace;">variant</span> above.<br><br>But do note that there is never an actua=
l need to repeat the algorithm in the various overloads, as my example demo=
nstrates. If the friend function is an unpalatable interface, the member ov=
erloads to call it will always be only one line each.<br></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 />

------=_Part_170_32877432.1378101354166--

.
