home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / std / cplus / 1174 < prev    next >
Encoding:
Internet Message Format  |  1992-09-13  |  1.8 KB

  1. Path: sparky!uunet!mcsun!corton!seti!inria.fr!daniel.edelson
  2. From: daniel.edelson@inria.fr (Daniel R. Edelson)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Answers on a postcard
  5. Message-ID: <4211@seti.UUCP>
  6. Date: 14 Sep 92 09:00:50 GMT
  7. References: <92255.154216KKEYTE@ESOC.BITNET>
  8. Sender: news@seti.UUCP
  9. Reply-To: Daniel R. Edelson <edelson@sor.inria.fr>
  10. Organization: INRIA -- Institut National de Recherche en Informatique et Automatique -- Rocquencourt, France
  11. Lines: 28
  12.  
  13. In article <92255.154216KKEYTE@ESOC.BITNET>, KKEYTE@ESOC.BITNET (Karl Keyte) writes:
  14. |> ...from a posting on 'comp.lang.c++'
  15. |> 
  16. |> In article <1992Sep10.174914.838@taumet.com>, steve@taumet.com (Steve Clamage)
  17. |> says:
  18. |> >
  19. |> The implication of what you say is that it is not possible to overload
  20. |> operators maintaining the correct functionality of the operator.  This
  21. |> indeed means that precedence in overloaded operators cannot be maintained
  22. |> if all operands are simply passed as arguments to the function implementing
  23. |> the operator functionality and evaluated in a language independent order.
  24. |> Imagine commonly used "chain" operators such as && and ::.
  25. |> 
  26. |> If what is described above is correct, and Mr.Clamage clearly has much
  27. |> experience in the area, then I think we have justification for pressing
  28. |> for a change in this area.  If not, I would ask: How does one overload
  29. |> the comma operator while maintaining its attibutes as an operator?
  30. |> 
  31. |> Karl
  32.  
  33. It seems to me that the ability to look at a comma expression and
  34. infer some semantics from the syntax is a valuable aid 
  35. for program readability. This seems to me like an argument for
  36. not permitting the comma operator to be overloaded. Of course,
  37. the logical extension is to then forbid && and || from being
  38. overloaded as well, but this seems unlikely to happen, unfortunately.
  39.  
  40. Daniel.Edelson@inria.fr
  41.