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.

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.

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

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.

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.

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

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?'

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:1. Type inference - this is a great idea. Haven't looked at Xtend's implementation but the concept is really sound.2. The ability to use byte and short literals in code such as 123b or 12345s.3. The addition of unsigned to the language, with appropriate numerical suffixes eg 255ub.4. Multiple inheritance. I'm fed up with writing boilerplate composites when the compiler could provide some shortcuts for me.5. Easier JNI. I suppose that's not achievable with this though.6. I'd still kinda like the reinstatement of the const keyword.7. An annotation for extension points in class inheritance.8. structs and mapped objects.ofc, all in addition to the stuff provided by Project Coin.

oh ho! That's quite nifty, definitely want some of that. I bet it needs a native library to make it work though.

Cas

Well, yes, it uses JNI under the hood. However, the native lib self extracts from the JAR, and the JAR includes bindings for Windows, Mac, Linux, Solaris and OpenBSD - x86, amd64 and sparc. There's an ARM version somewhere too, though not currently in the standard JAR.

Why depend on the vision of language extensions devised by someone else, when you can spend months making your own! Like here: Stratego/Spoofax. I've never bothered looking into eclipse's weaving framework..humm...stop! I waste too much time as it is!

Quote

4. Multiple inheritance. I'm fed up with writing boilerplate composites when the compiler could provide some shortcuts for me.

It's funny. I'm perfectly fine with dynamic languages where one can shove any old method into any container, but for some strange reason multiple inheritance makes my eyes start to twitch.

Quote

The one thing I like, and would love to see in Java, is optional double dispatch. No more bloody visitor pattern

Multiple dispatch is awesome. Sorry Cas, but I cry every time I need to write a visitor pattern.

yeah I'm going to write code that only works in eclipse and nobody else will even understand - good idea.

This. I find the bastardised code example in the landing video to be terribly unreadable. If I came part way into someone else's project and all the code looked like this, I would be politely stepping back out the way I came in. ;-)

The types, returns, visibility modifiers all add a level of detail with no ambiguity. Its nice to see "void" and know exactly what you get out of that method, etc.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org