home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / modula3 / 1145 < prev    next >
Encoding:
Text File  |  1993-01-24  |  1.2 KB  |  27 lines

  1. Newsgroups: comp.lang.modula3
  2. Path: sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watmath!undergrad.math.waterloo.edu!papresco
  3. From: papresco@undergrad.math.waterloo.edu (Paul Prescod)
  4. Subject: Re: references, objects & m3
  5. Message-ID: <C1E30F.vx@undergrad.math.waterloo.edu>
  6. Organization: University of Waterloo
  7. References: <C1BsMI.5Ay@undergrad.math.waterloo.edu> <MOSS.93Jan24164146@CRAFTY.cs.cmu.edu>
  8. Date: Mon, 25 Jan 1993 03:00:07 GMT
  9. Lines: 16
  10.  
  11. In article <MOSS.93Jan24164146@CRAFTY.cs.cmu.edu> moss@cs.cmu.edu writes:
  12. >I don't understand why you're using REF OBJECT ... END instead of just OBJECT
  13. >... END. The latter is implementation essentially as REF RECORD ... END, but
  14. >with the additional semantics of OBJECT method invocation, subtyping, etc. You
  15. >should probably just delete the level of REF in your binary tree stuff. Maybe
  16. >you want somehting like this:
  17.  
  18. Thanks for your help.  Someone else pointed out to me that objects ARE
  19. references.
  20.  
  21. I'm not sure if I like that.  For instance, how do I copy an object?
  22. The copy will point to the same data fields, right?  
  23.  
  24. Also is there anyway to auto-initialize/auto-destroy objects as in C++
  25. with constructors and destructors?
  26.  
  27.