home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / std / cplus / 1862 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.8 KB  |  44 lines

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
  3. From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
  4. Subject: Re: Zero-length structures and pointer comparisons
  5. Message-ID: <1992Dec19.203242.21236@ucc.su.OZ.AU>
  6. Sender: news@ucc.su.OZ.AU
  7. Nntp-Posting-Host: extro.ucc.su.oz.au
  8. Organization: MAXTAL P/L C/- University Computing Centre, Sydney
  9. References: <1992Dec07.222242.18703@microsoft.com> <1992Dec8.103218.27689@lth.se> <KANZE.92Dec10165804@slsvdnt.us-es.sel.de>
  10. Date: Sat, 19 Dec 1992 20:32:42 GMT
  11. Lines: 31
  12.  
  13. In article <KANZE.92Dec10165804@slsvdnt.us-es.sel.de> kanze@us-es.sel.de (James Kanze) writes:
  14. >|> alternative is of course to dismiss the idea as not worth the trouble.
  15. >
  16. >I favor the latter case.  
  17.  
  18.     I think that MANY collections will be collections of pointers.
  19. MANY of these types of collections will rely on there existing some
  20. total ordering. SOME of these will also require some that
  21.  
  22.     p==q <==> ptrcmpeq(p,q)==0
  23.  
  24. where I used ptrcmpeq to denote the version of ptrcmp that supports
  25. the above identity, whereas plain ptrcmp need not, and might
  26. always return 0.
  27.  
  28. (A third version, ptrcmppo might also preserve partial ordering of <.)
  29.  
  30. Therefore I think it is worth persuing the issue,
  31. especially as the 'ptrcmp' idea is an extension to the library,
  32. and thus might be acceptable to the committee, whereas changing
  33. the status of < might not.
  34.  
  35.     In fact I believe the status of == must be downgraded,
  36. even at the expense of C compataibility, and that will be a tough
  37. enough battle as it is.
  38.  
  39. -- 
  40. ;----------------------------------------------------------------------
  41.         JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
  42.     Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
  43. ;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
  44.