Stefan Ram said:
If the abovementioned people knows a language, for example,
Java so well and language Java is »just not the right tool«
but, for example, Tcl/Tk is needed, they might as well try to
find someone else to do this task (someone experienced in
Tcl/Tk) and concentrate on doing the things well they can do
well, i.e., search another task, were they can continue to
apply their Java skills.
For example, when a family doctor finds that one of his
patients needs surgery, he often will not take this as a
chance to learn and practice surgery, but pass this patient on
to a surgeon.
A valid way of reasoning, but this doesnt always apply to developers i dont
think, and i agree with Patricia's point here. The benefit of learning more
than one language isnt necessarily being more flexible (although that's a
nice bonus) but also to pick up new ways of thinking, or different ways of
solving problems that are quite specific to a certain language. This (i
assume) is why examples such as ANSI C or assembly language are given as an
alternative. As a Java developer you'll automatically get quite proficient
in proper OO design, use design patterns etc. etc. As an assembly language
programmer for example, you'll automatically pick up optimization techniques
and a thorough understanding of how certain algorithms and data structures
work (because you often have to do them from scratch) and their performance
impacts or implementation pitfalls. This kind of knowledge will help the
quality of the code you produce, regardless of the language.
As a practical example, a lot of beginning Java developers could not give
you an answer if you ask them when it's better to use LinkedList and when
it's better to use ArrayList etc. while the average ANSI C developer can
probably give you a reasonably accurate answer just by looking at the class
names, because they probably had to manually implement linked lists and
other collections at some point. I'm sure there are better examples to prove
my point but i think the general idea is clear; the more languages you've
worked with that require a different set of skills, the more complete you
will be as a developer. Certain languages simply force a certain way of
thinking or make you focus on certain problem area, be it performace, OO
design, code readability etc. All that said i think it shouldnt be made a
bigger issue than it really is. Someone that never did anything but Java
isnt by default a less complete developer than someone who knows 10
languages. By the way, C# and Java are almost the same so there isnt any
significant gain in learning both. Just learn the one most relevant for your
career plans i guess.
My $0.02