David N. Welton wrote:
[me:]
I think that there's a problem with various languages designed to run
on a JVM rather cancelling each other's popularity out. [...]
Various languages are designed to run 'on top of C', and that hasn't
hurt their popularity, although I suppose it's not possible to know how
things would have gone had there been only one language... I think that
while having too many choices does confuse people, and takes a little
bit away from everyone, that eventually the "market" is such that the
more popular and useful languages will rise to the top, and have enough
users and support that people will be able to happily use them if they
meet their needs.
I agree up to a point. But there are a number of differences in the situation,
which I think rather make it harder for an alternative JVM language to
establish itself.
One is that languages like Perl or Ruby (still less "real" -- i.e. not
scripting -- languages) don't "run on top of C" in the same way that Groovy,
say, runs on top of the JVM. That largely restricts their potential audience
to Java programmers -- which reduces the size of possible "market". (It
doesn't /have/ to -- it would be possible to create a language which used the
JVM internally as an implementation technology, but didn't advertise the
fact -- I don't know of any examples of that, but I suppose Jython comes
closest.) That may, by pre-selecting the potential audience to only Java
programmers, also discourage diversity amongst the proposed alternative
languages -- and if they are all pretty-much the same, why choose one over
another ?
Secondly, for most languages which run over the JVM, a major point is access to
the very extensive Java class libraries which already exist. Hence
interoperability with Java code is pretty much a requirement -- this limits the
space that such languages can live in, and thus reduces the distinctions
between them (or at least reduces the perceived distinctions). To some extent
this point overlaps with the previous one, in that it maybe explains why
languages with "hidden" JVMs don't seem to exist.
Another potential point is that such languages will always have big brother
Java looming over them. That shouldn't affect languages which are intended to
be pure scripting languages much -- any more than "big brother" C impedes Ruby.
But for languages that purport to be suitable for large scale development (Nice
and Scala, I think are in this space), then they have a problem in establishing
a competitive advantage over Java. Personally I'd rather try to persuade
people that my new pet language was a significant improvement over C (or C++)
than over Java -- especially if nearly all of my library functionality was
implemented in Java.
A contrary point, which has only just occurred to me. We may only now be
seeing a time when there is a significant population of programmers who /only/
know Java, or who learnt Java first, and know that language best. For them,
the C-derived conventions of some existing scripting languages may seem odd,
and more Java-like languages more attractive (especially as they come with the
familiar Java libraries). So perhaps the heyday of JVM-based scripting
languages is soon to be upon us.
If I were trying to push my pet scripting language, I would be trying very hard
to persuade the Eclipse, Netbeans, etc people to include my language as the
automation language for their IDEs, and -- ideally -- to rewrite the outermost
"glue" code of those IDEs in my language.
-- chris