IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Why are you so upset?
I was not trying to upset you. I was attempting to make sure that I was crystal clear. I also attempted to avoid making premature categorizations, for instance I had been about to just say that OO languages defined destructors when I realized that AFAIK JavaScript does not. How many others are the same? How many stripped down little languages call themselves OO? I have NFC.

I am sorry that this made you feel talked-down to. That was not my intention...
I am a frigging OO programmer, you know; I bloody well know what a destructor is! My question was only and specifically about Jim's expression "guaranteed destructor timing" -- which was used, both in his original post and several subsequent ones (including yours that I'm replying to now) in a confusing and self-contradictory way that showed that it isn't really destructors you're talking about. Thankfully, Scott began to clear this up a little... And I'll spell it out all the way for you, so you won't have to embarass yourself like this again.

[explanation of alternate strategies for resource freeing strategies at block exit deleted]

Geez, when you decide to make yourself look silly, you don't go halfway, do you? The fact that the very first post by gfolkert was not necessarily talking about destructors was indeed clarified at [link|http://z.iwethey.org/forums/render/content/show?contentid=109997|http://z.iwethey.org...?contentid=109997]. If you will read that post, see the techniques, and note who wrote it you might realize that I am perfectly aware of that. You might also start acknowledging the right person.

Which leads to the common sense advice that before you write a rant, review the thread.

Now there is one thing that Jim's response to you reminded me of. C++ differentiates between stack based and heap based objects, and manages them differently. Since all of the systems that I have dealt with extensively keep data in the heap, it slipped my mind that he would include C++ because of how it handles stack based objects. My bad. (Though many C++ programmers do use automatic reference counting in the form of smart pointers. And that is what I was thinking of in my response.) He happened to walk into an active debate in the Perl world right now, because Perl is going from reference counting (Perl 5) to true garbage collection (Perl 6) and so there have been interminal debates over the exact value of guaranteed destructor timing.

And answering one of your sarcastic comments, no, reference counting is not the same as true GC. Systems with true GC should be able to collect all garbage - including garbage that refers to itself through circular references. Reference counting fails to ever collect circular references unless you manually adjust for that. (Weak references make that easier.)

As for whether true GC is better or worse than reference counting, people debate that forever. To forestall pointless debate here, allow me to summarize:

  1. Reference counting is easier to understand.
  2. Reference counting offers more deterministic behaviour.
  3. Once implemented, true GC is easier to maintain. (In a large software project with reference counting, it is virtually inevitable that bugs will crop up in the counting, leading to memory leaks. This is far less of an issue with true GC.)
  4. GC handles circular references, which can easily come up in complex data structures, reference counting does not.
  5. Neither offers clearly superior performance. Or rather each clearly outperforms the other in the right circumstances. GC runs are not cheap. But neither are cache misses caused by constantly having to update reference counts in random places in memory.
  6. People tend to resist moving away from whichever one they currently use.

But like it or not, true GC is an idea that is working its way into more and more environments as time goes on. Higher order languages favoured by those who are into "research languages" have long favoured true GC. See Lisp, Smalltalk, Haskell, and Ocaml for examples. Mainstream languages being created by major software vendors in recent years have followed suit. This is true whether you are talking the Microsoft world (VB, C#, etc), web development (JavaScript) or Sun's world (Java). (Before you get annoyed at my not including Delphi, I didn't include Perl either - and Perl at this point probably has more users than Delphi.) There are some preliminary signs that scripting languages are starting to head that way (Ruby has it, some forms of Python do, the next generation of Perl will). Older mainstream languages and direct derivations thereof (C, C++, Pascal, etc) do not, and seem unlikely to change.

So why the trend? My take is that people who have built enough big systems get sick and tired of bugs in reference counting and eventually go with true GC because it is more reliable with less work. Of course I could be wrong, but that is the biggest argument given for true GC if you look for references on it, and it fits with comments from specific project leaders that I know who have chosen to use it in their projects...

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
Collapse Edited by ben_tilly July 17, 2003, 10:50:14 AM EDT
Why are you so upset?
I was not trying to upset you. I was attempting to make sure that I was crystal clear. I also attempted to avoid making premature categorizations, for instance I had been about to just say that OO languages defined destructors when I realized that AFAIK JavaScript does not. How many others are the same? How many stripped down little languages call themselves OO? I have NFC.

I am sorry that this made you feel talked-down to. That was not my intention...
I am a frigging OO programmer, you know; I bloody well know what a destructor is! My question was only and specifically about Jim's expression "guaranteed destructor timing" -- which was used, both in his original post and several subsequent ones (including yours that I'm replying to now) in a confusing and self-contradictory way that showed that it isn't really destructors you're talking about. Thankfully, Scott began to clear this up a little... And I'll spell it out all the way for you, so you won't have to embarass yourself like this again.

[explanation of alternate strategies for resource freeing strategies at block exit deleted]

Geez, when you decide to make yourself look silly, you don't go halfway, do you? The fact that the very first post by gfolkert was not necessarily talking about destructors was indeed clarified at [link|http://z.iwethey.org/forums/render/content/show?contentid=109997|http://z.iwethey.org...?contentid=109997]. If you will read that post, see the techniques, and note who wrote it you might realize that I am perfectly aware of that. You might also start acknowledging the right person.

Which leads to the common sense advice that before you write a rant, review the thread.

Now there is one thing that Jim's response to you reminded me of. C++ differentiates between stack based and heap based objects, and manages them differently. Since all of the systems that I have dealt with extensively keep data in the heap, it slipped my mind that he would include C++ because of how it handles stack based objects. My bad. (Though many C++ programmers do use automatic reference counting in the form of smart pointers.) He happened to walk into an active debate in the Perl world right now, because Perl is going from reference counting (Perl 5) to true garbage collection (Perl 6) and so there have been interminal debates over the exact value of guaranteed destructor timing.

And answering one of your sarcastic comments, no, reference counting is not the same as true GC. Systems with true GC should be able to collect all garbage - including garbage that refers to itself through circular references. Reference counting fails to ever collect circular references unless you manually adjust for that. (Weak references make that easier.)

As for whether true GC is better or worse than reference counting, people debate that forever. To forestall pointless debate here, allow me to summarize:

  1. Reference counting is easier to understand.
  2. Reference counting offers more deterministic behaviour.
  3. Once implemented, true GC is easier to maintain. (In a large software project with reference counting, it is virtually inevitable that bugs will crop up in the counting, leading to memory leaks. This is far less of an issue with true GC.)
  4. GC handles circular references, which can easily come up in complex data structures, reference counting does not.
  5. Neither offers clearly superior performance. Or rather each clearly outperforms the other in the right circumstances. GC runs are not cheap. But neither are cache misses caused by constantly having to update reference counts in random places in memory.
  6. People tend to resist moving away from whichever one they currently use.

But like it or not, true GC is an idea that is working its way into more and more environments as time goes on. Higher order languages favoured by those who are into "research languages" have long favoured true GC. See Lisp, Smalltalk, Haskell, and Ocaml for examples. Mainstream languages being created by major software vendors in recent years have followed suit. This is true whether you are talking the Microsoft world (VB, C#, etc), web development (JavaScript) or Sun's world (Java). (Before you get annoyed at my not including Delphi, I didn't include Perl either - and Perl at this point probably has more users than Delphi.) There are some preliminary signs that scripting languages are starting to head that way (Ruby has it, some forms of Python do, the next generation of Perl will). Older mainstream languages and direct derivations thereof (C, C++, Pascal, etc) do not, and seem unlikely to change.

So why the trend? My take is that people who have built enough big systems get sick and tired of bugs in reference counting and eventually go with true GC because it is more reliable with less work. Of course I could be wrong, but that is the biggest argument given for true GC if you look for references on it, and it fits with comments from specific project leaders that I know who have chosen to use it in their projects...

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
New Caw, caw: My own fault, mostly, mis-remembering the thread.
Ben T. writes:
I was not trying to upset you. I was attempting to make sure that I was crystal clear. [...] I am sorry that this made you feel talked-down to. That was not my intention...
Well, happens all too easily when one tries (too hard?) to be "crystal clear"... How could that not sound, to the suspicious mind, like (you thought) you were talking to the village idiot? :-)

Mainly my own fault, though; got in a cranky mood from misreading you (and Jim). Sorry about that. That's about all the crow I'm going to eat, here -- gotta leave some room for my reply to Jim... But, lest it be forgotten, I am sorry about that, and will try to learn from this lesson.


Geez, when you decide to make yourself look silly, you don't go halfway, do you?
Fuck, no, I don't believe in doing things by halves! :-)


Which leads to the common sense advice that before you write a rant, review the thread.
Yup, thanks; that's the lesson I'll try to learn from this .


And answering one of your sarcastic comments, no, reference counting is not the same as true GC.
Well, I wasn't trying to say the two variants were the same thing, either. What I was objecting to was your naming one variant "true" garbage collection while contrasting it to another...


As for whether true GC is better or worse than reference counting, people debate that forever. To forestall pointless debate here, [...]
...as per the abvove, by calling one implementation "true" you are perforce implying that the other is "false", and once you start discussing in terms like that, what's the use of having any "debate" in the first place?

(Not that I'd probably join a debate about contrasting garbage collection implementations even if it were conducted in less prejudicial terms; I don't hold with the whole idea.)


But like it or not, true GC is an idea that is working its way into more and more environments as time goes on.
Yeah, but that's the infamous Fly Diet Argument.


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
New Just responding to the GC point...
...as per the abvove, by calling one implementation "true" you are perforce implying that the other is "false", and once you start discussing in terms like that, what's the use of having any "debate" in the first place?

Real garbage collection algorithms get at anything that is garbage - including circular references. Reference counting does not detect self-referential garbage. It therefore is incomplete.

Therefore saying that reference counting is not true GC is not meant as a pejorative, it is descriptive. As a GC algorithm, reference counting is incomplete and has unfixable serious bugs. Of course it does things that real GC algorithms cannot do. Perhaps you don't want real GC? After all many complex systems haven't felt it necessary...

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
     Great OO arguement closer - (folkert) - (33)
         Re: Great OO arguement closer - (JimWeirich) - (32)
             Danke... -NT - (folkert)
             Huh? - (ben_tilly) - (29)
                 Re: Huh? - (JimWeirich) - (28)
                     Dunno, but I have a guess... - (CRConrad) - (27)
                         Guaranteed destructor timing explained - (ben_tilly) - (26)
                             OK, Jim, add one more: Delphi. (And rename the concept!) - (CRConrad) - (25)
                                 Introducing The Magic Of HTML - (pwhysall) - (11)
                                     Yeah, yeah, but not when I'm in a hurry. - (CRConrad) - (1)
                                         Well, slow down, then. - (pwhysall)
                                     Asterisks don't bother me -NT - (tablizer) - (8)
                                         It -NT - (deSitter)
                                         It -NT - (deSitter) - (6)
                                             STOP SAYING THE WORD!! -NT - (admin) - (4)
                                                 Suffice to say... - (FuManChu) - (3)
                                                     was it Nye or Ni? - (Simon_Jester) - (2)
                                                         Ni! - (pwhysall) - (1)
                                                             Sh! -NT - (FuManChu)
                                             WTF? -NT - (deSitter)
                                 Re: OK, Jim, add one more: Delphi. (And rename the concept!) - (JimWeirich) - (9)
                                     Ah; the problem seems to be I didn't take into account... - (CRConrad) - (8)
                                         Wow, are we in the same universe? - (JimWeirich) - (7)
                                             (... continuing from the previous message) - (JimWeirich) - (6)
                                                 Combining replies into a single (bigger) slice of humble pie - (CRConrad) - (5)
                                                     Lots of Comments ... - (JimWeirich)
                                                     You remind me of the blub paradox - (ben_tilly) - (3)
                                                         Speaking of PL History - (ChrisR) - (2)
                                                             Kay's thinking - (tuberculosis) - (1)
                                                                 xlnt -NT - (deSitter)
                                 Why are you so upset? - (ben_tilly) - (2)
                                     Caw, caw: My own fault, mostly, mis-remembering the thread. - (CRConrad) - (1)
                                         Just responding to the GC point... - (ben_tilly)
             Scope exit vs. object cleanup - (admin)

I just know what I read in the magazines.
167 ms