[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: "static" declaration

> Personally, I consider Java heavyweight because it has a restrictive
> typing system that is heavily coupled with inheriting behaviour.

That "heavily coupled with inheriting behaviour" bit is completely optional
in Java, although many people don't fully realize it.  The way one *should*
design and code in Java is to use explicitly declared interfaces to decouple
interface from implementation.  One then gains types (interfaces) that are
100% decoupled from implementation inheritance.  (In real Java systems, the
number is a little lower than 100%, but often not by much.)

This can have enormous benefits to system design, refactoring capability,
and even for things like build time (implementation changes don't trigger
recompiles of clients).

The design of a properly interface-oriented set of Java classes can be a
significant improvement over similar classes in a dynamically-typed OO
language.  Support for multiple explicit interfaces on a class allows for
decoupling and factoring of designs in ways that make a great deal of sense,
but often aren't practical to maintain in dynamically typed languages.