delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/16/20:35:43

From: Damian Yerrick <Bullshitd_yerrick AT hotmail DOT comRemoveBullshit>
Newsgroups: comp.os.msdos.djgpp,comp.lang.c++
Subject: Re: TABLE OF POINTERS TO FUNCTIONS + OTHER
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <l4t2dsg398i4e02b147mv18i89a5tvo0nq@4ax.com>
References: <8am435$j8i$1 AT tron DOT sci DOT fi> <38D1079A DOT 45700792 AT americasm01 DOT nt DOT com>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 32
X-Trace: /bQNubUySOp/3gOA0DNU7zsJZhno5AT5668FR/TDtKu2kAzahxDKRs2nxKx/tALPsNlxYgVa8JG6!O1UJqtJ1a6E9oknms8Nhm7C9jbC3X+PIgthHldWI0dj+7GTcxH9VMMAWZT45IZwu79GkXt1R+Q3x!0//GuxU=
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Fri, 17 Mar 2000 00:02:37 GMT
Distribution: world
Date: Fri, 17 Mar 2000 00:02:37 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Thu, 16 Mar 2000 11:11:07 -0500, "Campbell, Rolf [SKY:1U32:EXCH]"
<moscoop AT americasm01 DOT nt DOT com> wrote:

>Traveler wrote:
>>[snip: Accessor methods are annoying.]
>
>    Well, my responce is:  Don't use access functions!  I think they
>are one of the most over-used, annoying aspects of C++ programming.

You are so entitled.

>And most of the time they are just used to force 'read-only' for
>public access.  To start with, I think this should have been part
>of the C++ specification (const public: could mean that outside
>that class's scope it is treated as const).

But that would break all existing programs if you figured out a better
implementation of the class that didn't use that variable.  Data
hiding is one of the reasons why accessor methods exist.  How hard is
   my_string.length()
when string::length() is inlined to return my_string._length?

Language discussions belong in a language group; comp.lang.c++ added.

-- 
Damian Yerrick  http://yerricde.tripod.com/
Comment on story ideas: http://home1.gte.net/frodo/quickjot.html
AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/
View full sig: http://www.rose-hulman.edu/~yerricde/sig.html

This is McAfee VirusScan. Add these two lines to your .sig to
prevent the spread of .sig viruses.  http://www.mcafee.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019