🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Proposal for a new access specifier

#2151
From: Michael Furman
Date: Mon, 09 Oct 1995 14:36
28 lines
2152 bytes
In article <44spqj$j37@nn.fast.net>, 
jpm@nscs.fast.net (John McGrath)says...
>  ......
>The ideal would be to eliminate altogether accessor functions from the
>class interface.  Whether an attribute of a class is implemented as a
>variable or a function is not important to the source interface.
>Instead, there would simply be attributes, which could be accessed
>(i.e. square.Area).  Whether these were implemented as a data member or
>as a function (i.e. { return height * width; }) is not particularly
>relevent to the caller, so why should he specify "Area()" rather than
>simply "Area".

It is so close to my ideal. But I have one addition. You described "abstract 
read source interface". I would like to have also "write interface": to let 
caller write just "square.Area = 10;" instead of "square.Change_Area(10)".

-----------------------------------------------------------------------------
-------
Michael Furman,                                   (603)893-1109
Geophysical Survey Systems, Inc.              fax:(603)889-3984
13 Klein Drive - P.O. Box 97                      engr@gssi.mv.com 
North Salem, NH 03073-0097                        71543.1334@compuserve.com
-----------------------------------------------------------------------------
-------
---
[ 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: <DG6q6J.EEt@mv.mv.com>
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
References: <199509221547.JAA10782@ncar.ucar.EDU> <MATT.95Sep24112332@Austern> <44spqj$j37@nn.fast.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
Date: 09 Oct 95 14:36:11 GMT
Approved: fjh@cs.mu.oz.au
Newsgroups: comp.std.c++
From: ENGR@GSSI.MV.COM (Michael Furman)
Subject: Re: Proposal for a new access specifier
Message-ID: <DG6q6J.EEt@mv.mv.com>
Sender: usenet@mv.MV.COM (Paul Hurley)
Organization: GSSI
X-Original-Date: Mon, 9 Oct 1995 14:13:30 GMT
References: <199509221547.JAA10782@ncar.ucar.EDU> <MATT.95Sep24112332@Austern> <44spqj$j37@nn.fast.net>
X-Newsreader: WinVN 0.93.10
X-Auth: PGPMoose V1.0 PGP comp.std.c++
 iQBFAgUBMHkzr+EDnX0m9pzZAQGjyQF/SNZfqP4OUmtkITV12BiZ5b9su768J0TK
 sj1Ne7QaME2pMG2aTRq8+m5EF45zvV7/
 =wlG6