http://www.eclipse.org/Xtext/xtend/
It is not a new JVM language, instead it compiles to Java source code, ala CoffeeScript -> JavaScript
http://www.eclipse.org/Xtext/xtend/
It is not a new JVM language, instead it compiles to Java source code, ala CoffeeScript -> JavaScript
Good lord, the name sounds like a “male enhancement” pill Besides, I already have tons of syntax sugar for Java, it’s called Scala. ;D
Actually, it’s a pretty nifty idea as IDE features goes. Looks a lot like Lombok on steroids. I hope it’s actually portable and something I can fit into a maven or sbt pipeline.
I don’t see the point at all. I’d rather write the code that this generates by myself. I mean, the uber StringBuffer wrapper “optimization” isn’t that impressive. It doesn’t seem to reduce the amount of code you have to write in any meaningful way.
This looks pretty damned amazing! I will definitely be trying this out. No one has gotten improving Java right yet. This attempt looks really good!
Oh this is nice indeed. No need to wait for Java to add syntax sugar, just add an IDE plugin.
I thought Java already did the StringBuffer optimization when concatenating multiple strings on one line? A lot of the other changes seem pretty minor, and the ‘@SurpressWarnings(“all”)’ is pretty much a step back (the whole point of warning is to catch errors).
I’m not very impressed, and at least CoffeeScript adds some pretty major syntactical changes to JS.
yeah I’m going to write code that only works in eclipse and nobody else will even understand - good idea.
Hmm, seems a lot like “Java for people that doesn’t like the core values of java”.
But if that’s the case: Why not change language entirely?
Aight, I guess you could argue that this way you get to keep your libraries…
Sounds like a goods decision to compile to java files, although they are hardly as readable as what a good java programmer could write.
Anyways, it’s not for me, I’m not an IDE-guy
Um. One of the big selling points at the top is “In contrast to Java, Xtend removes unnecessary noise.” And then you scroll down to the sample code and see that it has removed the need to type System.out before println, but now appears to require you to add “def” before any method declaration. Yep, that looks less noisy.
Inexcusable pile of wank. Deliberate fiddling to make it look different.
Cas
Looking through the docs, there are some nice language features, and I think it’ll certainly look more terse. But one nice aspect I’ve just realised: there is no runtime library! So it’s just a pure language alternative to Java, which is kinda nice. It’ll certainly make it much easier to mix this and Java in a project, although personally I don’t recommend ever recommend doing that.
One could sarcastically, yet convincingly, argue that yes indeed, boilerplate is one of the core values of Java, but it’s nice to see something that challenges this assumption. The lack of a runtime requirement is a bonus, generation of idiomatic (“readable”) java is another … what this ultimately means is it’s a bunch of simple-to-medium-complex macros for a language that otherwise lacks macros. So in the end it’s nothing that blows my skirt up, but neither can I get myself worked up about something that dares sully the pristine perfection of Java which is perfect as it is now and always.
It’d be nice if Lombok worked with it, but I suspect this will be an Eclipse-only thing for a while yet.
This would be especially useful as a Java alternative for those writing applets, as most JVM languages have runtimes of several megabytes, which is just too big to include.
Oh this code looks so ugly Why would I want my code written in that just because I don’t know how to uses makros in eclipse? Or just typing another “;” Oh I don’t see where the features will help me… I would not use it even when not writing a game
Because there were too few compilation steps between Java and machine code already? Am I the only one here completely missing the point of this?
Change is really scary, eh guys?
I don’t think this is perfect. I want minimal changes to Java that reduce typing and improve readability. I like the type inference, property access, switch, and template expressions. I don’t like the rest. I may be able to ignore what I don’t like, except the default access. I’ll play around with it.
I think type inference is a definite win, if it is done well. Some of the Haskell error messages can be difficult to decode, especially if your new to it.
But most of all I think in this modern age, we should be able to get rid of the semi-colons. Languages like Ruby deal with it fine, I don’t think it’s ever been an issue. I don’t even think they should say it’s optional, because that kinda makes you feel like it’s advised. It makes you feel ‘why make it optional if it’s not needed at all?’
Hi
As I already said, in my humble opinion, Java’s syntax should not be modified anymore, it should be kept simple. Xtend only makes a few changes but if a developer does not like the core syntax of Java, he can use another language instead of “dirtying” ours. The JVM can support other languages and using several languages.
I can use a metaphor to explain what I mean. Imagine you’re with your girlfriend/boyfriend, you look at her/him and you think she/he should change some major aspects in her/his physical appearance. If she/he does so, maybe she/he will become unhappy. In such a case, I would rather break off and look for someone else. It is the same thing with programming languages: If you don’t like some major aspects in the syntax of a language, rather use another one.
Java is more verbose but more concise. Xtend only change a few things but it still looks like something else, another language.
True about the semicolons though we have to remember one of the key features of Java that made it popular in the first place was its extremely close lexical compatibility with the C and C++ family of languages. This is sort of what bothers me about efforts like Xtend - it seems like twiddling for twiddlings sake, without really realising what they’re losing while they’re at it. C is not a pretty language really, but the fact is, if you are used to coding in C, you feel comfortable when things look like C. Randomly adding stuff and taking it away - eg. “def”, semicolons - does not make the language more comfortable for anyone.
IMVHO they should have concentrated on fixing real deficiencies felt by programmers (and they have got some of this right by the looks), such as:
Cas
re: properties - we already have a perfectly good syntactical feature for these, it’s called the . operator. #facepalm
Cas