I don't for one moment doubt the advance that having garbage collection gave Java over, say, C++, but something that came across my mind the other day was:
Without garbage collection each object has an owner (or you have memory leaks), so it's more obvious which 'direction' things are supposed to flow in. For instance, in some code I've worked on, each GUI object has a ControlSet, which is basically a copy of the model. However, how ControlSets are delivered to those objects varies immensely, and there are temporal dependencies, to the point where actually supplying the thing at construction time instead of later causes problems, and various parts of code actually rely on setting the thing to null temporarily, etc. In short, it's a mess that I managed to work with, but it resisted all refactoring I tried. I still have some ideas, and access to the codebase, so I might have another go just for fun.. I think without garbage collection, such a codebase would be so leaky that it just wouldn't have been allowed to develop. I'm sure there would have been other problems in place of that one though! On Wed, Jun 15, 2011 at 10:20 AM, Robert Casto <[email protected]> wrote: > +1 Removed a huge number of headaches and made me way more productive. > > On Wed, Jun 15, 2011 at 7:45 AM, Paulo "JCranky" Siqueira > <[email protected]> wrote: >> >>> > +1 Garbage collection. >>> >> >> This one is so very much freaking true! This is probably the main reason I >> decided to use Java back in the day! >> >> -- >> Paulo "JCranky" Siqueira >> Visit my blog: http://www.jcranky.com/ >> >> -- >> You received this message because you are subscribed to the Google Groups >> "The Java Posse" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/javaposse?hl=en. > > > > -- > Robert Casto > www.robertcasto.com > www.sellerstoolbox.com > > > > -- > You received this message because you are subscribed to the Google Groups > "The Java Posse" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en. > -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
