Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!brunix!sdm From: sdm@cs.brown.edu (Scott Meyers) Newsgroups: comp.lang.c++ Subject: Re: 'soft' or calculated class members Message-ID: <78550@brunix.UUCP> Date: 15 Jun 91 02:37:44 GMT References: <1875@culhua.prg.ox.ac.uk> <2885931374@ARTEMIS.cam.nist.gov> Sender: news@brunix.UUCP Reply-To: sdm@cs.brown.edu (Scott Meyers) Organization: Brown University Department of Computer Science Lines: 23 Regarding whether to allow data member notation for function members: In article <2885931374@ARTEMIS.cam.nist.gov> miller@FS1.cam.nist.gov (Bruce R. Miller) writes: | Why not just make all of them get parenthesis! (whoops, lisp showing | through again!...) This is actually less whimsical that you suggest. I always encourage people to make *all* their public members functions, because then for users of the public interface, things are much simpler -- no need to guess whether to use data member syntax (no parens) or function member syntax. Most everyone overlooks the fact that a class's public interface is a kind of user interface: the users are application developers. They gain from conceptual consistency, too. Of course, there are times when data members in the public interface make perfect sense, but substantially less frequently than most people seem to believe. Scott ------------------------------------------------------------------------------- What do you say to a convicted felon in Providence? "Hello, Mr. Mayor."