"Faton Berisha" <fb******@uni-pr.eduwrote in message
news:jO******** *************** *******@giganew s.com...
Silvio Bierman wrote:
>>
Total nonsense. Destructors have nothing whatever to do with general
theory and science of algorithms.
Well, for that matter, neither do constructors.
Off course. Only a language as a whole represents a view on implementing
algorithms.
>
The reason for not implementing destructors in Java is,
I think, that many found it difficult to properly use them
(if not completely omit them), and this is compatible with not
implementing pointers.
I already stated why a destructor is in contradiction with the Java language
logic. Java object references are quite close to pointers in C(++). Only the
concept-mix of arrays and pointers that C++ inherited from C (as much as
Stroustrup said to regret that) is totally missing which means no pointer
arithmetic.
Being an old time C (and since its early conception, C++) programmer I kind
of liked pointer arithmetic and I must admit I sometimes miss it when doing
some array fiddling in Java.
Personally, the thing I miss the most from C++ is operator overloading.
(Readability is to blame here, I guess.)
I welcomed it when it was added to C++ and used it enthousiasticly . In
retrospect I find it is only suitable when implementing very generic classes
(like strings, collection classes etc). I always found application level
logic to be expressed best with descriptively named operations
(functions/methods).
Obviously, the designers had in mind things other than
developing a scientific computation or a system programming language
when designing Java.
My guess is they started with C++ but wanted something managed (Virtual
Machine based) and simpler (quirk-free as opposed to C++ which is full of
quirks that only language theorists like to play with). They made some good
design decisions, some bad. The resultng Java environment just works,
despite some things I would like to have seen different about the language.
The cross-platformness and the enormous amount of freely availably libraries
for almost anything a developer could need in combination with an OK
language has effectively won me over.
I find it pointless to discuss isolated language details or doing
apples/oranges comparisons between programming languages. In the end the
quality and timely availability of the resulting software systems is all
that counts, whichever languages where used to implement them.
Silvio Bierman
>
Faton Berisha