Eclipse Launches New Programming Language
An anonymous reader writes "Eclipse has launched a website for a new JVM language, called Xtend. It's built with Eclipse's Xtext and compiles directly to Java code, similar to what CoffeeScript does to Javascript. It's not just an announcement but it's already there and useable, including a very feature-rich Eclipse integration."
Why would anyone need a new programming languages? The ones I know are good enough for everything.
I like it. It looks like they've taken the power of C/C++ macros, wrapped it up in a clean simple syntax, and applied it to Java.
When I first started programming in Java, I was at a loss without my macros. The concept of macros and code expansion are so powerful, but often overlooked because they can be hideously difficult to debug and enhance.
I do not fail; I succeed at finding out what does not work.
Does it do anything that Groovy or Scala don't already?
The "You want performance? Fuck you, have more features instead!" of IDEs.
...but fat, slow and horribly resource-hungry.
Meh.
"We saw what you did with your classes, so we added some more classes to your classes to hide your classes because we have more class."
"We saw what you did with your syntax so we added some more syntax to your syntax to hide your syntax because we are more syntaxy."
"We saw that java still sucks so we added some more suckiness to java's suckiness to hide java's suckiness because our suckiness sucks less ... sort of ... maybe ..."
"... because our next step is to distract you from our new suckiness by adding more xml ..."
Seems like cool language. Much like Spring and the new JVM languages, it seems like this exists primarily to address shortcomings that Java has because it hasn't come out with new versions for so long.
Eclipse already writes a lot of Java for you, so this seems like a natural extension. Of course, this is a ridiculous state of affairs. When a most code in a language is boilerplate, it's time for a new version, that takes care of that for you. I mean could you imagine anyone releasing a Java-like language today that didn't have first class treatment of properties, didn't have syntax for applying a function to every member of a collection, and didn't have better type inference?
It's interesting that it compiles to Java, I don't think it'll be long before, it'll start to completely skip the Java phase.
Democracy Now! - your daily, uncensored, corporate-free
We are using Xtext (2.0) and its companion Xtend (2.0) to build domain specific languages. Together with Xbase, a part grammar for expressions, we can build new DSLs for various purposes in no time. And it is not such a code bloat as some people might think. When you develop applications with a wide range of models, these EMF-based tools are quite practical. Beside that, we evaluated ATL, QVT, and Xtend in various scenarios. Right now it looks like, that Xtend is very well suited to build generators to source code of other languages especially Java and Scala. It also made a good impression in model-to-model transformations.
I am sure Oracle wont be happy
http://saveie6.com/
Xtend is an example language developed with the Xtext language construction toolkit. It also now does double duty as a support language for that same toolkit. The dynamic dispatch and string template portions of the language make it ideal for model-to-model and model-to-text transformations (i.e. compiler construction) when developing Domain Specific Languages in Xtext.
We are planning to use this language in our future projects. Now we are searching experienced Xtend-coders with a minimum of 3-5 years experience on Xtend-coding.
Scalability and performance are important.
---------
There is inferior bacteria on the interior of your posterior.
http://www.eclipse.org/Xtext/xtend/#compilestojava
Though the example using a StringBuilder was ugly. Seems you should either generate readable code or efficient code.
I don't see anything about running this as part of an ant build, I can't see this being practical to use yet if the only thing available is an eclipse plugin.
Since when did that language become significant?
Also, bad analogy. CaffeeScript compiles to JavaScript source code. This new language from Eclipse compiles to Java bytecode (just like Groovy, Scala, +various other languages).
To have the .NET framework backwards compatible (like Java) you'll need to have all .NET frameworks installed which requires 4 GB. In what universe is that lightweight?
Yippy, yet another programming language. We need more of them - ideally 7 billion of them so everyone can have his own one.
Ok, cynism aside. Serious question: Why don't people work on making existing languages more effective by providing powerful frameworks, libraries and the like? It's the ecosystem that determines the value of a programming language - much more than syntax or any neat / elegant tricks. Starting with a new programming language puts you on square one again: No users, no frameworks / libraries.
Head is going to explode - what happened to having an industry standard language? If you know it, you can write programs in it. Magic pixie dust (toolchain, compilers, etc) turns your code into a binary for your platform.
I actually like syntactically weird languages better than C-like ones. The C-like ones are so similar it's hard to remember them. Switching languages is cognitively hard.
Example - length of string - is it:
strlen() like C and PHP
length() like Perl
string.len
string.length (properties)
string.len()
string.length() (methods)
???
Right now, I can't even remember Java's way of doing it, and I mainly use Java!
I need a desk full of O'Reilly books just to function.
When does this get really bad? When you have a PHP or JSP page that emits code in JavaScript, CSS, and jQuery. Yes, there is a logical and necessary distinction between JavaScript anonymous properties and CSS definitions, but after a few hours it all blurs together. Throw in the meta-level confusion (is this code, or is this emitting code?) and JSP's three syntaxes (Java, EL, and the thankfully mostly-ignored ColdFusion abomination JSTL) and my head wants to explode.
That man is a Stalinist - the way he asked the guy to take it off his website and not let anybody know that it exists. It's not enough to just deny permission for it to be a back end to GCC.
I won't be sad when he's gone.
Not sure whether there is a need for that today.
Instead of providing features that people don't really need, they'd better add native support to maven once and for all.
The way maven support is built today in Eclipse sucks big time and is making may of my clients look away.
I got the tutorial project created, but I don't see an option to compile/run it as Xtend?
A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
The thing is, C# has already macroing capability (and other lispy features) and Java is often dissed for the lack of it. This language seems to address that.
I don't care about type inference. My IDE does a good job. And I like static typing. But well, the language has closures and typed switches, so why not. But then the set/get feature.
First we got told that writing person.name = "John" is bad. Bad, bad, bad. I never understood why. Sure, getters and setters are very useful, beans and all, and it can take away some trouble, but if you really need a function that does more than change the value of field x, why call it setX()?
Anyway, that's the current practice: getX() and setX(), and sometimes they don't get x, or set x, but just pretend. Now Xtend translates person.name = "John" into a call to a setter. And that's even worse. In a previous job, I inherited C# code that had statements like db.open = true. Whaddya think that meant? Why, it opens the db connection, via the setter, of course! And indeed, assigning false... So now all this power of abuse has come full circle back to Javaland. What a mess.
Lets take C, wrap it in C, then wrap that in C and then wrap the whole thing in yet more C.
Can we please just program in C?
Hey KID! Yeah you, get the fuck off my lawn!
Just what we need....
---- Booth was a patriot ----
AMEN.
Where's that mod point when I actually need it?
This is not compiling for me starting with the "static":
class Test2 {
static main(String[] args) {
println("hello");
}
}
Too bad they don't provide a simple hello world example anywhere that is easy to find.
A 21st century issue: the irony of technologies of abundance in the hands of those still thinking in terms of scarcity.
Hurrah - it's been weeks since the last new programming language!
This will be used to create another pointless layer of abstraction away from the real (non-eclipse) world. At the end of every day I am do glad I don't have to touch that POS for another 18 hours. Consider this: during development eclipse loads classes directly from class files, while applications operationally load from jar files. There is no way to tell eclipse to load its classes in exactly the same was as an operational system, and no way to know for sure which classes will be loaded.
Rubbish.
http://michaelsmith.id.au
Eclipse already has about seven programming languages built into it in the form of custom xml schemas misused as procedural scripting languages.
http://michaelsmith.id.au
I think what you are looking for is called D.
Really type inference does NOT improve readability, someone taking a first look at the code will have to go all the way to the method declaration to know what the(hell) type of a variable. ... well I wouldn't say it is bad, it's just about getting used to.
And also no parenthesis? really? Worst Idea I ever herd of, this just takes away the formality Java is admired for and also those setters/getters really suck, they make the language loose and will cause troubles when using reflection since they are not really fields.
The closure thing is
But I really didn't like their flavour of switch, the ability of falling through, although requiring some additional care, is really the core feature of the switch, I use it quite often and it's just great because it allows a simple structure to represent multiple values taking to a single block of code, I really think that was unnecessary and mostly it will just be something "cool" that no one will use.
Anyway maybe someone find use for it, but to me it is just another language I don't like and don't want to deal with.
And I really think they should bother more at contributing to the Java language itself (like helping out with the OpenJDK) than wasting their time with another language to transform ten simple lines of code into a thousand redundant lines of terrible generated code.
Building Workspace.......................*crash*
This has been out for a while. It shipped with the last major release of Eclipse. In June.
simple answer... no. And groovy is easier to read and code.
This is my sig. There are many like it but this one is mine.
Posted my experience here:
http://longpants2.posterous.com/first-experience-with-eclipses-java-killer-xt
I want to use it, but I can't understand why it's missing this *one* important feature???
Posted my experience here:
http://longpants2.posterous.com/first-experience-with-eclipses-java-killer-xt
I want to use it, but I can't understand why it's missing this *one* important feature???
Am I the only one who is reminded of "Software Tools", and RatFOR?
...is sometimes intimidating. However, I can say with a fair amount of certainty that this is the GREATEST idea since Mono.
There are already many good programming lanuges out there.
Why not simply use scala? (a language known to have superb features and a user base)
I don't think the world needs much more than
haskell, scala, agda, coq
concerning the technical features.
I'm not interested in some tweaks to syntax that save a few lines I type automatically (or that Eclipse could automatically generate) in Java already. The overhead of learning a new language at all, with its typos and brainos, is bigger than any productivity or accuracy benefit it brings.
What would be useful would be a language that deterministically compiles to a runnable logic graph, and back from flowchart to text, that's as straightforward to program lexically in as Java, which we already know. And that runs on the JVM. That would be a useful new language. It should allow more multiprocessing, which hasn't been at all tapped in today's multicore CPUs with correlated parallel IO streams and structured relations selecting among many object datastructures dominating the runtime environment. New CPUs are coming bundled with FPGA, and every CPU has a parallel MAC array ASIC it can orchestrate from disk, net and memory DBs. Something really new that's dataflow, which still uses the old lexical tools, would really go bang.
The rest is like the "perfect text editor" that most programmers dream of writing, that is surely no better than emacs - or rather, than Eclipse. Not worth the effort to create, or to learn, compared with what that effort could produce using the language/editor/IDE, but writing more executable code rather than more tools that get you only a little further.
--
make install -not war
this made me laugh. This is a wtf
"Parenthesis for method invocations are optional, if the method does not take any arguments. Semicolons are optional and even the return keyword doesn't need to be specified. The result of the last expression in a method definition is treated as the implicit return value." - Urg. I like my code to be neat and tidy, and this is just a recipe for coder lazyness and inconsistency. Really, is ending your statements with semicolons so hard? Is going 'return result;' so fucking hard?
And switching on an instance class? That's the most obvious reek of "doesn't understand polymorphism" possible. Ever damn textbook uses a shape decoder as the canonical antipattern example..
The problem with languages with macros is that unlike, say, Smalltalk, you generally never know when macros might apply when and so change the meaning of what you are looking at unless you understand the *entire* program...
That seems to be more a problem of encapsulation, coupling and cohesion than anything else. Seriously, if a change in a macro is such that you do not know how it will affect a system, then either this is a macro version of a god object (does too much, or does something incoherently); or there is an abstraction leakage in the macro (the macro purposes, regardless of size, is not discrete); or the macro is poorly documented and people are using it wrong because of it.
What you described is exactly the same that happens if you make a change to the implementation of a class or component or procedure where the aforementioned artifact exhibits the same problems in encapsulation, coupling and/or cohesion. Don't delude yourself into thinking that this is an innate problem unique to macro systems.
People can shit-code crap that exhibits side-effects when subjected to supposedly internal changes. You gotta know your tools, but most importantly, you got to know how to code and design software.
The thing I hate most about javascript is it allows the coder to decide to be lazy with semicolons. Now, on purpose, someone has decided to include parenthesis as well?! IMHO "You can write hard to debug code" is not a feature. Give me a JIT language that is identical to C/C++, Pascal, or Fortran in syntax and features not a "looks and works kinda like language" and I'll stand at attention.
optional semicolons: bummer. ...bummer.
optional parenthesis: bummer.
resembles Java's syntax: resembles the syntax that resembles C++ but not really
operator overloading: why no link? This is the only thing I thought was interesting.
compiles to readable Java code: Another compiles to language to be JIT'd by the other language's JIT... language? That just hurts.
BTW, this is opinion not flame. If you like Java, that's cool.
Having to work for a living is the root of all evil.
Xtend is the love child of Java spending the night with Python, and it looks like Python took the walk of shame.
WTF?
Eclipse runs quite okay on my Pentium 4 with 1.7 Ghz whereas Netbeans would take the whole CPU time.
What is your preferred IDE?
Gedit?
Seriously, this smells so much of Scala it isn't even funny. I'm all for another great language on the JVM, but how is this different from Scala? A lot of the concepts are the same, and the syntax is likewise quite similar. Combine this with other Scala knock-offs like what JetBrains was doing and it's just sad.
People keep talking about how Oracle is killing Java, yet this NIH (Not Invented Here) syndrome that's plaguing the non-Java world is just as bad if not worse. Let's rally behind Scala, fix it up as you see fit, and get some great tooling behind it. That seems to be the biggest issue with Scala to date. IntelliJ is nice, but I like Eclipse, and that just sucks even with the recent push.
Who is John Galt?