||What I Hate About Your Programming Language|
|Subject:||Java; I want a destructor!|
Response to: Java; I want a destructor!
Unfortunately the presence of a destructor poses HUGE problems for a garbage-collected language. The garbage collector can't tell when it's safe to collect an object, it can't just drop all the objects when the program ends, etc. I too missed destructors, but try ... finally ... is a good substitute.