Java != JVM
Posted Mar 18, 2004 12:05 UTC (Thu) by
hjernemadsen (subscriber, #5676)
In reply to:
Java != JVM by joib
Parent article:
Will Mono Become the Preferred Platform for Linux Development? (O'ReillyNet)
Write any non-trivial program in Java and it's almost certain that
you'll make extensive use of the collections classes. Well gee, say
goodbye to your type safety. The only thing that static typing gives you
here is lots of type casts all over the place (Ugh!).
But that is not a problem with type safety, but rather a problem with the
Java language. I you do the same thing in C++ you can use the
STL-library, which amongst other things provides lists and sets of any
type, with guaranteed type safety. So no type casts are needed, and you
are guaranteed that you can only add the elements to the list, if they
have the correct type.
In my experience having type safety catches many programming errors.
(
Log in to post comments)