🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3116

Re: Give operator. a chance

#3116
From: Fergus Henderson
Date: Fri, 26 Jan 1996 07:50
36 lines
2211 bytes
I agree with Joe Buck - this issue is at this stage dead and buried, at
least for this round of standardization.  But I can't let comments like
these pass unchallenged ;-)

David Byrden <100101.2547@compuserve.com> writes:

>New facilities are not added to the C++ language when their effect can be 
>attained by a little programming using existing facilities.
>
>From your description, it seems to me that an your operator.() object 
>method would return a reference to another object, and the named member 
>function would be called in that object. For example, here is class 
>Handle acting as a proxy for a class Bitmap;
[...]
>Operator.() was not overloaded because you can achieve exactly this same 
>effect without it,

Perhaps you can in this particular case...

>if the clas Handle has a set of member functions matching those in Bitmap,

... but only with a lot of tedious programming.  Furthermore, all those
forwarding functions are a maintenance problem; every time you add
a new function to Bitmap, you need to remember to add one to Handle.

Now, please tell me how to write a template smart reference class without
using operator.()?  Can I attain that effect "with a little programming
using existing facilities"?  I think not.

--
Fergus Henderson             	WWW: http://www.cs.mu.oz.au/~fjh
fjh@cs.mu.oz.au              	PGP: finger fjh@128.250.37.3
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <9601260532.14152@mulga.cs.mu.OZ.AU>
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
References: <3102AD11.1663@et.se> <4e0pj1$rq6@news.bridge.net>

Show Full Headers
Complete Article Headers
From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
Message-ID: <9601260532.14152@mulga.cs.mu.OZ.AU>
X-Original-Date: Fri, 26 Jan 1996 16:32:02 +1100
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
Date: 26 Jan 96 07:50:08 GMT
Approved: fjh@cs.mu.oz.au
Newsgroups: comp.std.c++
Subject: Re: Give operator. a chance
Organization: Computer Science, University of Melbourne, Australia
References: <3102AD11.1663@et.se> <4e0pj1$rq6@news.bridge.net>
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMQiH2eEDnX0m9pzZAQFT1QF/RG2xsdy0ALEjzQ/M9Ewp1fD25oSeQ3Cw
 D6HrwisoHajqdB/miZYUvId+ZCr5ZDd4
 =tjTn