Live data from Hacker News

Eclipse launches new language to cut down Java boilerplate - Extend

eclipse.org

121–130 of 229 posts

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

#121

This basically looks like Kotlin, except it explicitly compiles down to Java. I'm not sure how I feel about this. Pre-Kotlin, I would have thought "hey, neat", but now it seems like we're on the verge of a number of half-supported half-hearted attempts at being Java.next, each with their own pros and cons. I wish that IDEA and Eclipse could have worked together on this.

It's a pity everyone gets so worked up over trivial things like parens - Clojure is a beautiful language that absolutely deserves to be the next big language on the JVM. Yes, it offers a different programming paradigm from Java, but perhaps to make any genuine headway in the future we need a clean break from Object Orientation and it's muddled conflation of identity and state.

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

#122
post #93

Earlier quoted context omitted.

Of course, if you did write Java/C++ style curly brace code in Ruby, those of us who like Ruby would bring out the pitchforks.

At least then vim would understand it and you wouldn't have to deindent every 'end' yourself. It would be nice to be able to use % and some other stuff that you get with most other languages. The fact is that the visual style of a language is trivial to get used to. Breaking my text editor is a real issue though.

vim does understand Ruby. As soon as I type end, it automatically de-indents the line 2 spaces. Put this in your ~/.vimrc:

    filetype plugin indent on

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

#123
post #5

Oh, it looks like Xtend is to Java as Coffeescript is to Javascript. Although I'm sceptical about it compiling to Java source. Java seems to be going through a period of experimentation, and alternative Java-like and JVM languages. Interesting times.

Legal JavaScript is legal coffeescript. Is legal java legal xtend ? Can we expect something like http://js2coffee.org

Sorry to be pedantic. In JavaScript:

    (function () { });
Would definitely not be valid CoffeeScript. Invalid keyword `function`.

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

#124

Meh. I don't understand what is so bad about Java. Yes, there's boilerplate, which can addressed with the right development tools. New languages are a good thing. But a language whose sole purpose is to remove boilerplate from Java, does not really get us anywhere.

If you have to program in the Java ecosystem, not only "a language whose sole purpose is to remove boilerplate from Java" helps you tons, but it gets you to a lot of places.

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

#125
post #75

Earlier quoted context omitted.

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.

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

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

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

#127
post #14

Parenthesis for method invocations are optional, if the method does not take any arguments. obj.compute instead of obj.compute() That seems silly. The optional semicolons also irritate me. ----------------- (Added) I imagine a committee of Java developers, in a penthouse boardroom at Oracle, meeting with management to discuss Java's descent into disuse. "Lets make Java more concise," suggests a senior developer. "Yes…

Cargo cult is actually your argument, i.e thinking you need the parenthesis and the semicolons, just because Java always had them...

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

#128
post #3

What is Xtend supposed to provide that Scala doesn't already provide? It looks like their setting out to solve a subset of the problems that Scala deals with already.

Full blown first class Eclipse Java IDE integration PLUS a nice, conservative syntax that is not Scala.

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

#129
post #13
post #5

Oh, it looks like Xtend is to Java as Coffeescript is to Javascript. Although I'm sceptical about it compiling to Java source. Java seems to be going through a period of experimentation, and alternative Java-like and JVM languages. Interesting times.

One of the nice things about compiling to Java source is that it allows you use it with GWT. The only downside that I can see is that there might be constructs that you can't express in Java that you would want in a new language (note that you're fine with ones that you can technically express in Java but are just ugly, like closures). There are probably not very many of them, though.

From a quick scan of the Xtend page, it seems to be fairly backwards compatible with Java source code.

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

#130
post #56

Granted Im not the target market, but Implicit returns do not seem like a good idea.

Yeah, is there precedent for that? It looks fucking nutty. Can you do it in the middle of the function!? So odd. There's a lot of cruft in java, but I'm not sure the return statement is even on the list of things I'd bother attacking.

Lisp, Dylan, Smalltalk, ML, Haskell, CoffeeScript, and Dart all have various levels of implicit return. It makes sense in a language where there are no statements, just expressions.

Generally code is written to not need to return from the middle of a function. This is only really inconvenient in loops, and at least Dylan, Lisp, and Smalltalk make some provision for an "early return."

Post reply on HN