home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / object / 3048 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  1.6 KB

  1. Xref: sparky comp.object:3048 comp.lang.eiffel:1009
  2. Newsgroups: comp.object,comp.lang.eiffel
  3. Path: sparky!uunet!psinntp!bony1!richieb
  4. From: richieb@bony1.bony.com (Richard Bielak)
  5. Subject: Re: Class methods (was: Re: How to design a data structure library)
  6. Message-ID: <1992Jul28.201820.27793@bony1.bony.com>
  7. Organization: multi-cellular
  8. References: <5618@vexpert.dbai.tuwien.ac.at> <1992Jul27.155428.11825@bony1.bony.com> <graham.712283419@galois>
  9. Date: Tue, 28 Jul 92 20:18:20 GMT
  10. Lines: 37
  11.  
  12. In article <graham.712283419@galois> graham@maths.su.oz.au (Graham Matthews) writes:
  13.  
  14. [...]
  15.  
  16. >
  17. >Are you really serious about this notation Richie? This means that
  18. >I would have to write integer addition as
  19. >
  20. >    !!c.+(6,7);
  21. >
  22. >After all it creates a new integer!
  23. >
  24.  
  25. It's not the notation that I'm arguing for. 
  26.  
  27. !!c.+(6,7) is certainly awful syntax. But, (as Jim McKim suggested in
  28. private e-mail) couldn't the compiler do the translation from c := 6 +
  29. 7; to the above monstrocity.
  30.  
  31. My point is that certain methods, "+" for example, should be class
  32. (i.e. creation) methods.
  33.  
  34. However, once you get away from numbers, with their historical
  35. notation, things make more sense. How about a "concat" method on
  36. strings. We'd have:
  37.  
  38.            !!s.concat("foo", junk);
  39.  
  40.  
  41.  
  42. ...richie
  43.  
  44. -- 
  45. * Richie Bielak   (212)-815-3072   | "Your brain is a liquid-cooled parallel  *
  46. * Internet:       richieb@bony.com | super-computer". He pointed to his nose, *
  47. * Bang {uupsi,uunet}!bony1!richieb | "This is the fan."                       *
  48. *    - Strictly my opinions -      |                     - David Chudnovsky - *
  49.