home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / modula3 / 1154 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.9 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!hri.com!noc.near.net!ceylon!newshost!fn00
  2. From: fn00@gte.com (Farshad Nayeri)
  3. Newsgroups: comp.lang.modula3
  4. Subject: Re: references, objects & m3
  5. Message-ID: <FN00.93Jan25182249@tahoe.gte.com>
  6. Date: 25 Jan 93 23:22:49 GMT
  7. References: <C1BsMI.5Ay@undergrad.math.waterloo.edu>
  8.     <MOSS.93Jan24164146@CRAFTY.cs.cmu.edu>
  9.     <C1E30F.vx@undergrad.math.waterloo.edu>
  10.     <FN00.93Jan25085601@tahoe.gte.com> <24699@alice.att.com>
  11. Sender: news@ceylon.gte.com
  12. Organization: GTE Laboratories, Waltham, Massachusetts, USA
  13. Lines: 27
  14. In-reply-to: ark@alice.att.com's message of 25 Jan 93 19:35:20 GMT
  15.  
  16. In article <24699@alice.att.com> ark@alice.att.com (Andrew Koenig) writes:
  17.  
  18.    In article <FN00.93Jan25085601@tahoe.gte.com> fn00@gte.com (Farshad Nayeri) writes:
  19.  
  20.    > - Because of garbage collection, destructors are not as crucial in
  21.    >   Modula-3 programming. (What do you usually do in a destructor in
  22.    >   C++?)
  23.  
  24.    If C++ had garbage collection, destructors would sometimes still be
  25.    useful.  For example, if I have an object that represents a window in
  26.    my window system, I really do want the window to go away as soon as
  27.    the object is no longer in use, rather than waiting around for the
  28.    next garbage collection.  A similar argument applies to flushing the
  29.    buffer of an I/O library structure as soon as possible.
  30.  
  31. That's why I said "not as crucial" and "usually". Much like other
  32. things in Modula-3, I think of it as an application of 80%-20% rule.
  33. Personally, I wouldn't mind trading in constructors and destructors in
  34. return of a good garbage collector.
  35.  
  36. --farshad
  37. --
  38. Farshad Nayeri                Intelligent Database Systems
  39. fn00@gte.com                  Computer and Intelligent Systems Laboratory
  40. (617)466-2473                 GTE Laboratories, Waltham, MA
  41.  
  42.   "To see is to forget the name of the thing one sees." -- Paul Valery
  43.