Live data from Hacker News

Eclipse launches new language to cut down Java boilerplate - Extend

eclipse.org

131–140 of 229 posts

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

#131
Eclipse is painful to use, just switching to using IntelliJ Idea IDE I have felt a lot more productive. I still have to use both since my company's "official" IDE is Eclipse and if I'm working on a problem where another developer might be looking at something with me I have to use it or they'll get really uncomfortable. The auto-completion in IntelliJ and better responsiveness of the UI make it a much better expiernece IMO. I really think one of the main problems with Java IS Eclipse, if more Java dev's used a better IDE I can't help but wonder if things like this wouldn't be thought of as being as necessary

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

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

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.

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.

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

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

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.

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

#134

Earlier quoted context omitted.

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

Someone said Dylan so I just respond...my favorite language of all times :)

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

#135

Earlier quoted context omitted.

Scala has a time to market and a perception problem. Look for Kotlin to be the Scala that Scala never will be.

I don't know what your beef with Scala is, but you're seriously deluded.

Your problem is that you think that Scala can overcome its perception problem. No, it can't. Scala is history and will never be anything. Look to Kotlin.

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

#137
post #118
post #116

Earlier quoted context omitted.

The evidence for this statement best comes from a research paper* that attempts to formalize language expressibility . According to their formalization, language features are classified as macro expressible if they can be implemented in terms of local syntax transformations of other language features. The paper shows that expressivity, power, and conciseness come the most from those features that are not macro expres…

local syntax transformations This is the key concept, and I disagree with you that this is all Xtend is. Its why I think you are wrong. Specifically, the Xtend transformation is adding information to the java code it generates that it must infer from the Xtend source code. It is precisely not a local syntax transformation. I think you are assuming that because they make it look easy, that all it is is another macro l…

You misunderstand what a local syntax transformation is. A syntax transformation is just a function that takes syntax as input and returns syntax as output. The function can be arbitrarily complex, even "inferring" things from the input syntax.

The key point is whether the transform is local or global. An example of a global transform is turning a program into continuation-passing style because it must change every function definition and function call in the program.

The transforms that Xtend is doing appear to be local. Converting closures to anonymous inner classes is a local transformation. Their "type inference" isn't real whole-program type inference, it just saves keystrokes within certain expressions. The fact that they can show you the underlying Java code that each new feature turns into indicates that the transforms are local.

Also, these types of transformations really are trivial in languages with full-featured macro systems (like most LISP dialects).

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

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

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.

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

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

#139
post #137
post #118

Earlier quoted context omitted.

local syntax transformations This is the key concept, and I disagree with you that this is all Xtend is. Its why I think you are wrong. Specifically, the Xtend transformation is adding information to the java code it generates that it must infer from the Xtend source code. It is precisely not a local syntax transformation. I think you are assuming that because they make it look easy, that all it is is another macro l…

You misunderstand what a local syntax transformation is. A syntax transformation is just a function that takes syntax as input and returns syntax as output. The function can be arbitrarily complex, even "inferring" things from the input syntax. The key point is whether the transform is local or global. An example of a global transform is turning a program into continuation-passing style because it must change every f…

The referenced paper is way over my head, so I'll just say where I'm having difficulty and perhaps you can help me out.

Java doesn't have closures. Xtend does. Closures seem to me to satisfy the paper's definition of providing greater expressibility. Certainly, I've done a lot of C# and Java, and having closures in C# has greatly influenced how I write code.

And yet closures appear to be what you claim is a local syntax transform, and therefor can not add any expressibility to the language.

I am confused.

Update: I didnt downvote you btw.

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

#140

This reminds me quite a bit of Groovy, just with a different compiler back end (outputting Java source instead of bytecode). However, this makes me wonder what the point is. Groovy is more-or-less source compatible with Java already (a valid Java program is also a valid Groovy program), so I'm not sure what Extend brings to the table.

A valid Java program is not always a valid Groovy program - see http://groovy.codehaus.org/Differences+from+Java

== in Java is identity, in Groovy it is .equals() Inner classes are not supported.

Post reply on HN