Hacker News new | ask | show | jobs
by phzbOx 5347 days ago
So, "Extend is for the Java Programmer". I'm curious to see how this will turn out as there are some pretty cool features in this language. (Particularly the multiple dispatch, closures and type inference). However, any Java programmers could have made the switch to Clojure or Scala to keep working with the JVM. But, Extend is different in that it generates Java code instead of JVM. So, I'm wondering who will use that.

- Java programmers who are still stuck with old version: Even though they'd dream about using this, I'm guessing that won't compile to java 1.4/1.5.. right?

- Java programmers who already switched to high level language on top of jvm (Scala, clojure, etc.): Maybe the few who are still with Eclipse would switch back.. but I guess the majority of programmers in this scenario wouldn't want to switch.

- Java programmers who refuse, for various reasons, to learn newer languages/tools: Since it's still Java.. and still in Eclipse, it might be easier for them to give it a try? But then, if they refused to switch to newer language, it might be surprising to see them switch to Extend.

I'm a bit puzzled (as you can see). Personally, if I have to use the jvm, I'd go with clojure all the way.

6 comments

  > Java programmers who already switched to high level language on top of jvm (Scala, clojure, etc.) ... Java programmers who refuse, for various reasons, to learn newer languages/tools
that's still a fairly risky approach. these new tools are, well, new. Reminds me of this quote: "One founder wanted to negotiate out of having to pay $10K in lawyer fees. Said just because it was always done that way doesn’t mean we had to do it that way this time. Turns out that person wanted to rewrite the book of convention on every decision he made. I can’t tell you that’s why his company failed but it sure didn’t help."[1]

Lots of people have shipped multi-million dollar systems in Java. Not so many people have done it in clojure. Tone check: my next job will probably be in scala or clojure, its just not necessarily the answer to everything. See my comment above in this thread where I quote two scala evangelists talking about how scala's future is uncertain.[2]

  [1] http://permanentrecord.firstround.com/2011/10/31/term-sheet-negotiation-tells/
  [2] http://news.ycombinator.com/item?id=3198120
It may also be a better option for developers who are in less control of their language/platform.

Large companies/teams come to mind, who want to avoid individuals using languages unfamiliar to the rest of the group (making it harder for others to maintain). The "compiles to readable java code" may be what convinces someone who would otherwise be against something like Scala.

Not saying it's 100% rational, that I agree with the position, or is a large market, but I can imagine it applying to certain groups. There's a certain comfort in knowing that at the end of the day you still have Java code.

Scala and Clojure both involve lots of new ways of thinking. This is why I like them. I suspect it is also a reason many hesitate to try or switch to them. People say you can use Scala as basically java with less boilerplate, but if you want to read other people's code, you need to understand a whole lot of new concepts. With Clojure there's no pretending you won't need to learn a bunch of new concepts. With Xtend however, the changes are limited enough that it can be a palatable first step for the hesitant.
Java 1.6 is 5 years old. If you're the kind of company that couldn't upgrade to it in the last 5 years, it's probably too big of a leap to adopt this.

  > If you're the kind of company that couldn't upgrade to Java 1.6 in 5 years
it doesn't always work like that. imagine a very rich customer who has all sorts of proprietary customizations to all of their software investments. millions of LOC. nobody's gonna port that shit off of java 1.5, and they told ya to deploy in their existing server environment, and ya do it because, well, they're rich.
There is no porting to be done between 5 and 6.
Sadly, often time you'll have clients that use older version and you need to stay backward compatible for them.
" However, any Java programmers could have made the switch to Clojure or Scala to keep working with the JVM"

Clojure is a nonstarter for the vast majority of Java programmers for obvious reasons, and Scala has a perception problem.

> for obvious reasons

As someone from outside the Java universe, I'd like to learn more about those reasons and why they are obvious.

I'd wager Clojure and its Lispy roots is way too foreign-looking for most Java programmers. And to be honest, the functional programming paradigm is pretty hard to grasp when you've never seen it before, and requires some effort to get proficient in (and more thought, but I don't want to be derogatory against Java programmers).
The problem is education, they still teach java like it is programmed 10 years ago.
The vast majority of Java developers are very, very comfortable with static typing and the most advanced IDEs in software development.

Clojure with its s-expressions and dynamic typing is going nowhere except for some small, high-brow teams...just the way it is.

Scala lost its opportunity a while back with its perception problem and lack of IDE support.

Can you please explain the Scala's perception problem?
I can tell why I (a java programmer who slowly moves to Clojure) didn't go the Scala route. Because every time I've seen code sample comparisons, the clojure one was shorter then the java original and the scala was longer. Plus it's foreign enough from java... so if I do it, better to go all the way and make it worth it.
I'm surprised how is that even possible? You can probably translate every Java file, line-by-line into Scala. Then remove the redundant type declarations and you're already shorter. Then you can actually rewrite it to something less imperative and still shorter.

Do you have any real examples of longer Scala code? I couldn't find any.

Kotlin will cure the Scala curse. Scala is history...no matter what Odersky and pals try to recover it from. Scala is history...it's time to market and bad perception...adios..

Kotlin will be the successor to Java.

Fair enough, s-expressions are foreign to most developers, but dynamic typing? JavaScript/ECMAScript is one of the most widely used languages in the world. Dynamic typing and even first class functions are something most developers should be very comfortable with.
>> Java developers are very, very comfortable with static typing and the most advanced IDEs in software development.<<

Java's IDEs just cut down the boilerplate and scutwork involved in dealing with Java. They can even make Java usable. That is, in fact, an advanced and challenging task.

I have discovered that my corner store sells a commercial IDE for Lisp that accomplishes the same thing -- eliminating all the garbage involved in Java programming. It's called a notepad and pen. Combined with a Lisp, it surpasses all the features of Eclipse that eliminate busy work, duplication, and waste.

And it executes code about as fast as a JVM straining under Eclipse, too.

<b>However, any Java programmers could have made the switch to Clojure or Scala to keep working with the JVM.</b>

A lot of Java programmers can't stand Clojure and Scala. It's not like functional languages have any real adoption (> 5%) in the industry...

Scala is not really functional. Or at least it doesn't force you to write anything in a functional way.

I'd say it's about as functional as Python... which did get a lot of traction lately in various different places.