home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / std / cplus / 933 < prev    next >
Encoding:
Text File  |  1992-07-23  |  1.5 KB  |  37 lines

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!mundil.cs.mu.OZ.AU!fjh
  3. From: fjh@mundil.cs.mu.OZ.AU (Fergus James HENDERSON)
  4. Subject: Re: Alternatives to operator.()
  5. Message-ID: <9220614.4939@mulga.cs.mu.OZ.AU>
  6. Sender: news@cs.mu.OZ.AU
  7. Organization: Computer Science, University of Melbourne, Australia
  8. 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>
  9. Date: Fri, 24 Jul 1992 04:37:40 GMT
  10. Lines: 25
  11.  
  12. To expand a little on my previous post:
  13.  
  14. >Alternatively you could define one function on smartrefs that returns
  15. >a smartref-controller:
  16. >
  17. >    Smartref r;
  18. >    control(r).invalidate_cache();
  19. >    control(r).query_status();
  20. >
  21. >This looks like a nice way of doing it to me, since it visually flags
  22. >the use of meta-operations, while still allowing the normal "." syntax.
  23.  
  24. The more I think about this the more I like it.
  25. In fact I would say that is is *better* than just allowing
  26.     r.invalidate_cache();
  27. since you *want* meta-operations to stand out as being semantically different
  28. to standard operations. This method allows you to clearly seperate the two.
  29. Also in general you might want to control access to meta-operations, and
  30. having this seperation also makes that easier.
  31.  
  32. -- 
  33. Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
  34. This .signature VIRUS is a self-referential statement that is true - but 
  35. you will only be able to consistently believe it if you copy it to your own
  36. .signature file!
  37.