Live data from Hacker News

Eclipse launches new language to cut down Java boilerplate - Extend

eclipse.org

191–200 of 229 posts

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

#191
post #149
post #143

Earlier quoted context omitted.

Closures are code+data and objects are also code+data, so adding closures to a language with an object system does not increase expressibility. The main difference is that with closures you write the code and the data part (the environment) is captured implicitly, whereas with objects, both the code and data are explicit. This makes it possible to convert a closure into an object, and an object into a closure, withou…

It's all code plus data. I can implement any java, C#, Xtend feature in C or assembly language, but by your argument that makes C# no more expressive then C. If this is your argument, then it would appear that your argument is that the entire class of imperative languages are a waste of time and we should all be using lisp or scala. Back in the real world, I find C# to be more productive than C, because I am able to…

The question isn't whether or not feature A can be implemented in language X, it is whether or not it has to be implemented as a local or global transformation. This is what the paper cited above defines as expressibility: adding a feature that requires a global transformation increases expressibility.

I made no claims about whether or not more or less expressibility is a good thing or how it relates to productivity. Nothing in my responses has anything to do with whether or not functional or imperative styles are better in terms of productivity or maintainability. In fact, by the definition in the paper, adding imperative features to a functional language increases expressibility. Also, adding goto to a language increases expressibility, so it is not a metric that is solely related to maintainability and productivity.

I am not arguing that Xtend is a bad idea at all, in fact I think it's a great idea. The whole reason people like languages with powerful macro systems is that they can implement features that Xtend gives to Java in the language itself, rather than having to wait for a new language implementation.

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

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

And more specifically: It appears to be common Hackernewserthink that "productivity" equals "the ability to type code as fast as possible".

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

#195

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.

Much of the time, I'd agree. But working on a large system in Java, I repeatedly see a few places where Java's boilerplate overwhelms the code I actually care about.

Operations on collections:

  List result = new ArrayList();
  for (String word : words) {
    result.add(word.toUpperCase());
  }
  return result;
Accessor methods:

  private String name;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }
And arithmetic on user-defined types:

  new Dollars(15).plus(new Dollars(25)).times(new Percentage(80))
This bulky, uninformative, junk code is a real barrier to readability, and these are just simple examples. Sure, it's possible to work around it, and to keep the badness contained, but it still means time wasted for anyone who needs to maintain it.

We started writing some code in Groovy on our large Java project at work a few months back, and it's been a revelation. Groovy feels like a bit of a hack in all kinds of ways, but we're still delighted with it, because being able to say:

  return words.collect { word -> word.toUpperCase() }
or:

  String name
or:

  (new Dollars(15) + new Dollars(25)) * new Percentage(80)
just makes it _so much easier_ to see what's going on at a glance. Maybe if I were on a different sort of project -- one where I spent less time maintaining old code, or working with collections of data -- reducing boilerplate would seem like less of a big deal. As it is, though, it has seriously improved my quality of life. If Xtend can bring that kind of improvement to more people, I'm all for it.

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

#196

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

* There are memorable keyboard shortcuts for everything. * It can generate comparatively more code for you. * It's faster, though I fear it's working on losing this advantage. * The autocomplete is smarter, and has a few different options.

I started using IntelliJ a few years ago, when I came onto a Java project after several years using vim and Python, and I'm convinced it made the transition a lot less painful.

The difference between IntelliJ and Eclipse may be smaller than it feels to me now--IntelliJ is what I'm used to, after all, so using Eclipse involves adjusting to a subtly different interface--but I'd still say it's worth a try. There's a free version, so there's not really anything to lose.

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

#197

scala's own evangelists are worried that scala won't overtake java: "...Scala (the language, the tool-chain, the ecosystem, nothing about Scala) is not mature enough to be a Java replacement and barring an order of magnitude or two more investment into Scala commercialization, I don't see Scala becoming a Java replacement"[1]. this is despite seeing twitter and foursquare adopt scala at scale. and Scala's team, Oders…

Java has first class functions. They're just called something else and contain a few more characters to create them.

I don't understand why some people consider this to be a massive hurdle...

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

#199
post #196

Earlier quoted context omitted.

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

* There are memorable keyboard shortcuts for everything. * It can generate comparatively more code for you. * It's faster, though I fear it's working on losing this advantage. * The autocomplete is smarter, and has a few different options. I started using IntelliJ a few years ago, when I came onto a Java project after several years using vim and Python, and I'm convinced it made the transition a lot less painful. The…

Eclipse crashes on me or freezes up frequently despite using a quad-core brand-new laptop with 8gb memory. The UI frequently becomes unresponsive. Anything to do with IO such as opening files, having maven pull in a bunch of files, etc is horribly slow and usually causes the app to freeze.

As far as I know it doesn't offer variable suggestion, in IntelliJ you just type the first letter or 2 and it immediately suggests any variables you have in scope, I find this invaluable as it really speeds up writing code sometimes. Overall, I find it simpler whereas Eclipse is just kind of a free-for all where you need to make use of a patchwork of plugins to be successful. IntelliJ is written by one company so I just always get the feeling it has a better "engine" underneath it.

Half the developers on my team curse Eclipse and say they hate it but none have switched to using another IDE except me, the others are too set in their ways, I get the feeling its firmly embedded amongst a certain generation of Java dev's but if you're just starting out (I'm also pretty young relatively speaking) I'd recommend considering using another IDE.

Post reply on HN