Live data from Hacker News

Eclipse launches new language to cut down Java boilerplate - Extend

eclipse.org

91–100 of 229 posts

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

#91

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.

Even though Kotlin is still essentially vaporware for those outside Jetbrains, we know that it'll have at least decent (if not great) IDE support right off the bat when the alpha/beta is released. I think that Kotlin could be the Java successor that Scala never will be.

IIRC, JetBrains will also be providing an Eclipse plugin (though turning it over to the community after initial dev).

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

#92
post #19
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…

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.

Sadly, often time you'll have clients that use older version and you need to stay backward compatible for them.

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

#93
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…

Ruby does not get rid of semicolons or brackets. Heck, you can write Java/C++ style curly brace code in Ruby if you wanted.

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.

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

#94
post #19

Earlier quoted context omitted.

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.

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

#95

Earlier quoted context omitted.

How do you differentiate between referencing a method, and calling the method? I.e., foo.Sort(x.compare)? I think the idea of computed fields implemented via methods is better represented via C#-style properties, although I'd prefer to be able to access their methods directly, when suitable.

You'd use an underscore to form a partially applied function: foo.Sort(x.compare _) And Scala's getters and setters are essentially equivalent to C#'s properties: class A { private var _x = 0 def x = _x def x_=(value: Int) { _x = value } } val a = new A a.x = 5 println(a.x)

So instead of a simple, uniform rule that () invokes a function, and no-() references the function, you add yet a third syntax?

This is not an improvement, it is an unnecessary complication.

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

#96
post #87
post #26

I wish they'd taken it just a little further and made surrounding brackets optional (using indentation instead). I.e. def greetABunchOfPeople(List people) people.forEach println(sayHello)

Further! greetABunchOfPeople List people pers:people println pers.sayHello

You still have a dot in there!

    greetABunchOfPeople List people
        people do
            _ sayHello println

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

#98
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…

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.

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

#99
post #31
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…

Talking about cargo cult, they added "def" to function definitions making it more verbose actually.

That's probably to make it easier to parse with type inference, since right now it's the type name that start's a method definition

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

#100
post #87

Earlier quoted context omitted.

Further! greetABunchOfPeople List people pers:people println pers.sayHello

You still have a dot in there! greetABunchOfPeople List people people do _ sayHello println

You left a type in there!

    greetABunchOfPeople people
        people do
            _ sayHello println
Post reply on HN