Live data from Hacker News

Eclipse launches new language to cut down Java boilerplate - Extend

eclipse.org

161–170 of 229 posts

Re: Eclipse launches new language to cut down Java boilerplate - Extend

#162
post #7

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 tha…

However, any Java programmers could have made the switch to Clojure or Scala to keep working with the JVM. 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.

Re: Eclipse launches new language to cut down Java boilerplate - Extend

#163

I'm actually kind of worried about what the generated Java code will look like. From what I can see from the greeter example, it's.. well, not very pretty. It certainly looks nothing like what one would normally write if one was writing pure Java code. Imagine having to maintain that.

I 'm pretty sure you would maintain the extend code. Otherwise your doing it wrong :P

In that case, what's the use of compiling to java source code, why not compile directly to bytecode?

Re: Eclipse launches new language to cut down Java boilerplate - Extend

#164
post #75

Earlier quoted context omitted.

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.

Re: Eclipse launches new language to cut down Java boilerplate - Extend

#165

I'm sorry to say, but I think the Go programming language has just been owned by this Extend programming language for Java. Go missed the boat when it did not include some minimum class support to appease the developers used to Java, C++, and so on.

Isn't comparing Go to Xtend something like comparing apples to oranges? The first one is a language that can be used for low-level development. The other one provides a nicer syntax and some cool features for Java. If anything, it can be compared to Cofeescript which basically does the same thing for Javascript.

It's not an easy comparison to make, yes. But Go isn't really that low level. It has garbage collector, type inference, unique concurrency support that hides threads... And it's provided on App Engine.

App Engine also supports Python and Java. I figure folks could use Xtend to write Java web apps that cut some of the boilerplate and perhaps even deploy to App Engine, for instance. Giving folks an alternative to going with Go as a static typed language.

Perhaps Xtend using Java source-code as an intermediate medium confuses people a little. Using Eclipse to program using Xtend/Java may just be too seamless for it not to matter much after you've grown used to it.

Re: Eclipse launches new language to cut down Java boilerplate - Extend

#166
post #64

I'm sorry to say, but I think the Go programming language has just been owned by this Extend programming language for Java. Go missed the boat when it did not include some minimum class support to appease the developers used to Java, C++, and so on.

I develop with Eclipse and MDD at my day job, Go in my side projects. I'll definitely evaluate Extend for the day job enterprisey stuff, but in Go, I don't miss the class hierarchy at all; I find it very refreshing.

Go is cool. Go isn't too fast and doesn't have as much tool support as Java/Xtend. Go may be great if you're doing network programming on Linux. Like many tools originating from Unix environments, the cross-platform support may not be a top priority.

You're set as you already use Eclipse. :-)

Re: Eclipse launches new language to cut down Java boilerplate - Extend

#167
post #144
post #108

I'm pretty disappointed in the discussion that has gone here. There's been so much argument over things that don't matter much in the end, like whether or not optional semicolons and parenthesis are a good thing. These things are so superficial! It makes me believe that few people appreciate what actually makes a language good or bad. The fact that Xtend can be easily translated to Java source code is a big sign that…

HN is the wrong forum to discuss this. Many people here are not the target audience who don't use Java and have a preconceived dim view of it. (I'm expecting downvotes but whatever.)

What's the right forum for this, then?

Re: Eclipse launches new language to cut down Java boilerplate - Extend

#168

Very cool. One nitpick (unless the video glossed over the details) is that the double arrows in the video for "personToGreet" looks weird because it's not a basic key on the keyboard.

No problem, when you hit Ctrl+Space on the Eclipse editor it completes with a pair (opening and closing) these "chevrons"

And in other editors on non-Macs, using the US-International keyboard layout gets you guillemets (their proper name) with `AltGr-[` and `AltGr-]`. On Macs, they are `Option-\` and `Shift-Option-\` (not quite as good, but still there).

Re: Eclipse launches new language to cut down Java boilerplate - Extend

#169
post #69
post #66

Earlier quoted context omitted.

> 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.

Re: Eclipse launches new language to cut down Java boilerplate - Extend

#170
post #110

Earlier quoted context omitted.

It is also great for using with Android/GWT. Scala can be both used with Android[1] and GWT[2], but it is not a walk in the park. It seems like a great gateway drug for Scala. [1] https://github.com/danielribeiro/HelloScalaOnAndroid [2] http://news.ycombinator.com/item?id=3198154

I agree. I use Scala for a personal Android app. Once you get over the antbuild and proguard hurdle - agree its no walk in the park - its smooth sailing. Scala meshes well with the android libraries and is fast. Although it gets highly wonky if you need to add a library that is not a jar but instead a package. The major downsides which are super troublesome are that it takes 2 minutes to build each time - even for tr…

You can speed up the build time a lot by preinstalling Scala on the phone or emulator. This will allow you to skip the Proguard step. Here's how you do it http://zegoggl.es/2011/07/how-to-preinstall-scala-on-your-an...
Post reply on HN