home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c++
- Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!mundil.cs.mu.OZ.AU!fjh
- From: fjh@mundil.cs.mu.OZ.AU (Fergus James HENDERSON)
- Subject: Re: Alternatives to operator.()
- Message-ID: <9220614.4939@mulga.cs.mu.OZ.AU>
- Sender: news@cs.mu.OZ.AU
- Organization: Computer Science, University of Melbourne, Australia
- References: <1992Jul20.235728.29058@microsoft.com> <Brqq7D.97w@world.std.com> <1992Jul23.024159.18039@microsoft.com> <BruME9.HGJ@world.std.com> <9220604.6372@mulga.cs.mu.OZ.AU>
- Date: Fri, 24 Jul 1992 04:37:40 GMT
- Lines: 25
-
- To expand a little on my previous post:
-
- >Alternatively you could define one function on smartrefs that returns
- >a smartref-controller:
- >
- > Smartref r;
- > control(r).invalidate_cache();
- > control(r).query_status();
- >
- >This looks like a nice way of doing it to me, since it visually flags
- >the use of meta-operations, while still allowing the normal "." syntax.
-
- The more I think about this the more I like it.
- In fact I would say that is is *better* than just allowing
- r.invalidate_cache();
- since you *want* meta-operations to stand out as being semantically different
- to standard operations. This method allows you to clearly seperate the two.
- Also in general you might want to control access to meta-operations, and
- having this seperation also makes that easier.
-
- --
- Fergus Henderson fjh@munta.cs.mu.OZ.AU
- This .signature VIRUS is a self-referential statement that is true - but
- you will only be able to consistently believe it if you copy it to your own
- .signature file!
-