🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Proposal for a new access specifier

#2196
From: Alex Martelli
Date: Sat, 14 Oct 1995 22:12
37 lines
2197 bytes
ENGR@GSSI.MV.COM (Michael Furman) writes:
	...
>>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)".

To paraphrase Dennis Ritchie: "If you want Sather, you know where to find
it...!":-).  (If you _don't_ know: ftp.icsi.berkeley.edu, /pub/sather).

To explain: it is of course unthinkable that changes of this magnitude
would be adopted in the standard as late as NOW.  And a good thing, too!
C++ cannot and should not be all things to all people -- it's arguably
even too large as it stands; and it's unarguably high time for a STABLE
standard for it.

Other languages (excellent ones, too) are exploring and will further
explore every conceivable corner of the language-design space.  Sather,
in particular, among many other ideas, implements exactly this sort of
syntactic sugar; if it's really that important to you, I _do_ stronly
suggest you try it out.  (Personally, it's one of their few choices
that I _dis_like, so, I'm _quite_ happy that C++ doesn't have it:-).


Alex


---
[ 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: <m0t4Dmy-000glNC@axpblib>
Path: arc1-ca.pugleaf.net!news.mindlink.net!agate!agate!Matt
References: <199509221547.JAA10782@ncar.ucar.EDU> <MATT.95Sep24112332@Austern> <44spqj$j37@nn.fast.net> <DG6q6J.EEt@mv.mv.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.mindlink.net!agate!agate!Matt
From: martelli@cadlab.it (Alex Martelli)
Newsgroups: comp.std.c++
Subject: Re: Proposal for a new access specifier
Date: 14 Oct 1995 22:12:46 GMT
Organization: Cad.Lab Spa, Bologna, Italia
Approved: Matt@Austern
Message-ID: <m0t4Dmy-000glNC@axpblib>
References: <199509221547.JAA10782@ncar.ucar.EDU> <MATT.95Sep24112332@Austern> <44spqj$j37@nn.fast.net> <DG6q6J.EEt@mv.mv.com>
NNTP-Posting-Host: austern.hip.berkeley.edu