RE: Dear Java-Killers

Sven Efftinge has a blog post up giving his dos and don’ts for “java-killer” programming languages. I thought I’d go through his points one by one and see how Gosu stacks up.

1) Don’t make unimportant changes

I think Gosu does a pretty good job here: we didn’t set out to invent a whole new collections hierarchy and we have very few gratuitous or academic features. We tried to make it easy for Java developers to become productive in Gosu and keep on using the old familiar techniques and libraries they are used to.

2) Static Typing

Check.

3) Don’t touch generics

In Gosu we actually *simplified* Java generics (at the cost of correctness) by doing away with wildcards, which are the primary pain point for most Java developers. This is in contrast to other languages that have more complicated (but more correct) generics systems.

So I think Gosu improves on Java in a way that is easier for most Java developers to grok: just drop wildcards, and things usually work the way you want.

4) Use Type Inference

Check.

5) Care About Tool Support

Tentative Check. We currently have an Eclipse plugin and we expect to have extremely solid tool support in both Eclipse and IntelliJ by the end of the summer. This is our #1 priority right now.

6) Closures

Check. And we address Eric Parnell’s first comment with Enhancements, which allow us to add the usual functional suspects to java.util.Iterable (map(), where(), etc.)

7) Get Rid of Unused Concepts

Gosu retains bitshifts and a fall through switch statement. They come up every once in a while, and, since Java has them, it’s probably best to keep them around.

So Gosu stacks up well against Sven’s Dos and Don’ts.

Gosu isn’t an attempt to reinvent the way that we write code: it is an imperative language with some useful functional concepts as well. Most of the features and syntax are taken from various existing languages, and we’ve tried, for the most part, to deviate from Java as little as possible (e.g. feature literals use the familiar Javadoc syntax.)

The real innovation in Gosu is the Open Type System, which lets Gosu act as an excellent host language for other external DSL’s, such as XSD, WSDL or Java Properties Files, all of which can be accessed and manipulated in a statically typed manner from Gosu.

For Java developers, this should be pure win: all those resources you’ve had to work with using either code-gen tools or with an untyped dynamic API can now be used immediately: just drop your WSDL or Properties file on your classpath and, blam, go.

Sweet.