Eclipse launches new language to cut down Java boilerplate - Extend
131–140 of 229 posts
Re: Eclipse launches new language to cut down Java boilerplate - Extend
#132Earlier 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.
Re: Eclipse launches new language to cut down Java boilerplate - Extend
#133Earlier 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 be the successor to Java.
Re: Eclipse launches new language to cut down Java boilerplate - Extend
#134Earlier 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."
Re: Eclipse launches new language to cut down Java boilerplate - Extend
#135Earlier 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.
Re: Eclipse launches new language to cut down Java boilerplate - Extend
#136Kotlin will take over Java. That is fact. Mark my words on 11/05/2011.
Re: Eclipse launches new language to cut down Java boilerplate - Extend
#137Earlier 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…
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
#138Earlier 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.
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
#139Earlier 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…
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
#140This 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.
== in Java is identity, in Groovy it is .equals() Inner classes are not supported.