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