Live data from Hacker News

Eclipse launches new language to cut down Java boilerplate - Extend

eclipse.org

181–190 of 229 posts

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

#181
When I read the title, I hoped they had built a replacement for the tedious XML declaration of plug-ins, with Commands and Workbench Core Expressions and all that.

(Example: http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclips... )

Am I right that Eclipse Xtend is just not targeted towards extending Eclipse at all, despite the name?

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

#182
post #148

Earlier quoted context omitted.

Java's anonymous inner classes basically work like closures, except that they require that you mark some variables as final and that you have to write a lot of boilerplate. My underbelly feeling is that xtend's closures merely compile to those. Often, such closures are enough. E.g. with Google Guava's predicates and filter/map methods, you can do with Java (guava + anonymous inner classes) what LINQ enables in C# (Sy…

And C++ classes merely compile to C methods with mangled names that also take a pointer to a C struct, the first member of which is a pointer to an array of such functions, and whose remaining members are the fields. If you (or GP) are going to argue that C++ is no more productive than C simply because cfront turns C++ into C, then I think theory has gotten in the way of reality.

Eh. I was arguing the direct opposite. I have the feeling that you're just looking to pick a fight.

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

#183
post #116
post #111

Earlier quoted context omitted.

The fact that Xtend can be easily translated to Java source code is a big sign that it probably won't have any dramatic impact on your productivity I do not believe that there is any evidence for this statement. Translating ARM assembly language into opcodes is orders of magnitudes easier than translating Xtend into Java, yet I would argue that even that had a dramatic impact on my productivity back when I was doing…

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…

First, the fact that this language is coming from the Eclipse team suggests to me that they are probably not limited to macro transformations, at least at a fundamental level. The main reason Java folks like Eclipse is that it has a global understanding of Java code (this is why plugins for text editors tend to flat out suck compared to real Java IDEs, they are mostly dealing with local information), and I'd imagine that people working on an IDE that made non-local code comprehension a core focus of the product would make sure they're able to extract that information fairly easily from a language that they designed themselves.

That aside (since I agree that most of what they're doing appears to be fairly local, at the moment), what are the features that you miss in Java anyways, as compared to something like Ruby or Python, once you add closures and a bit of syntax sugar to cut out boilerplate? Past that, I can't think of much that people actually use day-to-day (and no, callcc doesn't count) in Ruby or Python that's not already possible in Java, albeit with a little more line noise. Can you?

When I look at code across many languages, the thing that makes Java code stand out as particularly clumsy is that it forces a lot of local verbosity, and that functional programming is very clumsy due to the lack of closures (though it's possible if you're willing to swallow your pride and endure some pain).

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

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

> The fact that Xtend can be easily translated to Java source code is a big sign that it probably won't have any dramatic impact on your productivity. It appears to be common Hackernewserthink that "productivity" equals "the ability to write code as fast as possible". Beyond the first few weeks of coding, you'll spend much more time reading code and refactoring it. What Xtend offers is an object model and type system…

> It appears to be common Hackernewserthink that "productivity" equals "the ability to write code as fast as possible". Beyond the first few weeks of coding, you'll spend much more time reading code and refactoring it.

And even more time thinking.

This is one of the reasons I never understood the obsession many people have with vim/emacs/whatever shortcuts and the like, for me they are distractions from what is really important: thinking about what code does and what it should do.

Fun fact: Ken Thompson doesn't touch-type, and a couple other amazing hackers I know are the same. I suspect this might even be a benefit as it encourages them even more to think before they type.

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

#185

Earlier quoted context omitted.

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.

Well downvoting instead of providing an example to the claim is a bit cheap...

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

#186
post #178

Earlier quoted context omitted.

Are you absolutely sure that Clojure can fit all problem domains? Clojure might be great for MapReduce type of programming. Does it fit a typical Accounting, CRM, Claim management (those kind of business-y app) software projects?

Actually, I really am sure Clojure will fit in all of those problem domains. Indeed, I'm pretty sure that if you experienced a well-written Clojure accounting app, you'd wonder why people bothered with Java.

Would like to see the code if you have the example. Would be a very interesting case-study as to why Functional fits such problem domain as opposed to OOP because this would open a new perspective.

Please share more. I'm interested. (Let me know if you can only share your experience via private channels).

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

#187

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.

One of the reasons Go programmers love it because it does not appease Java and C++ developers.

On the other hand Go for the most part appeases C developers quite nicely.

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

#188

Earlier quoted context omitted.

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…

Go still compiles to native code and provides direct control over the memory layout of your data structures.

This alone makes it considerably more low level than anything that runs on the JVM.

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

#189
post #64

Earlier quoted context omitted.

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

Go's cross-platform portability is quite good, writing portable Go code is infinitely easier than writing portable C or C++ code, and probably as easy or more than Java.

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

#190

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

I _just_ started on Java on eclipse, after 4 years of _IDE-less_ coding in python.

Care to tell me what you find better in IntelliJ, as compared to eclipse, so that I dont waste a lot of my time with Eclipse? :-)

Post reply on HN