Java 8 for Community?

I can see some good utility for lambdas in an extension I am writing. The way it turns out, I would need to build Community using Java 8. Right now the instructions say it must be Java 6. Is there any timetable for relaxing this requirement ?  Is Community going to go to 8 any time soon? Is it technically possible to build with 8 despite the explicit runtime checks for (exactly) 6 which will, I think I understand, prevent compilation from preceeding?

typos

10 comments
Comment actions Permalink

The problem is that Java 6 is still the most stable and default option for running IntelliJ on OSX - AFAIK this isn't likely to change any time soon, unfortunately.

0
Comment actions Permalink

Hey Colin,
This may be naive thinking but if Intellij is going to support java 8 constructs and analysis, it has to be written in Java 8, no? Think about the java compiler API , reflection, things like that . If I am going to write an IDE that specifically allows you to write a program in Java 8, I am really making work for myself if I write it in LISP or Perl or even Java 6. I am disadvantaging myself by foregoing all the knowledge about Java 8 built into Java 8. That knowledge, broadly speaking is knowledge I need to present to my user in a variety of forms, either as explicit parsing information or deriviatively so to speak such as runtime checks for correctness etc etc,.

0
Comment actions Permalink

No, not at all - you can write editor support for Java 8 in whatever you like. For example, the IntelliJ support for other languages (Javascript, Python, Ruby etc) is all written in Java.

0
Comment actions Permalink

I'ts not that it can't be done in other than 8. We all know any program can be realized in any Turing complete language.  It's that doing so separates the IDE writer from the most obviously useful and powerful tools needed to get the job done right. Information in the Compiler API which became available in 6 made a lot of things involved in writing Intellij easier (I presume) . So also with Lambda expressions and all the other new parts of Java 8. The language's ability to reflect on itself is what I'm referring to. It (just has to) make a lot of IDE tasks easier when dealing with code written in Java 8.   Why? Because it's the IDE's specific job to understand Java 8 code. In the simplest case, having the libraries of Java 8 answer the question - "is this Java 8 programming construct as written by the user OK?" That's gotta be easier to answer using Java 8 than using Ruby or VB or Perl. Why? Because, Java 8 "knows"  about Java 8. Java 6 doesn't "know" about Java 8, doesn't know if a Lambda is OK because it doesn't know what a Lambda is. There's just gotta be stuff like that happening. just programmer instinct here.

Is this all about Apple? Maybe a separate code base for them? Sounds like a lot of extra work. Could the size Apple market segment support its own source code branch and still be profitable?

0
Comment actions Permalink

IntelliJ does not use the compiler API for any of its analyses. Note that the current version of IntelliJ already fully supports Java 8, even though it can still run on Java 6.

0
Comment actions Permalink

It's actually used lightly in Community in the BuildManager and ClasspathBootstrap, but your point is taken.

Still, you *ought* to use it ;\

I mean, why let Apple drive the technical direction of your company? Are they going to move off 6 *ever*? If not, what does that imply for you and your ability to take advantage of new Java features?

Jobs *meant* to split the programming world and force everyone to make a choice because he liked it when he had a captive audience in a (very nice) walled garden. He had it in for Java the same way he had it in for anything he was not 100% in control of. Is Intellij really going to let some guy who hates Java generally dictate their JDK?

Good tools drive developer' choices who in turn create good software and software eco systems which leads to products which users want to buy. Companies follow users because they  have to because, you know, that's where money comes from and you know, you need money to buy food and whatnot.

Only monopolies and governments are exempt from this consumer-led chain. Jobs wanted to create a world in which he was a monopoly and he suceeded at the cost of market share. Do you really want to follow him down into that microworld? \


Anyways...

0
Comment actions Permalink

The reason why IntelliJ IDEA does not use the compiler API has nothing to do with Apple. It does not use the compiler API because its own code can do everything that the compiler API can do, and is much better optimized for the specific use cases that are found in IntelliJ IDEA.

0
Comment actions Permalink

I see.. then you coud do both, use your better homegrown- which I am ALL about- and alsomove to 8 and benefit from what 's there to be had. Here's one vote for using  *, or, at least, making JDK 8 an option ....

0
Comment actions Permalink

I was wondering the same thing : why IDEA is still using java 1.8.

I looked the code of the community edition, to do my own plugin, and I found Kotlin code, and heard about Java 8 used in some testing modules.
With the coming release of Kotlin (if I'm right, it should have its first release in the coming month, right ?), do you plan to convert the IDE to kotlin ? It could be a big publicity for Kotlin I think, and it allow to use all functionallities of Kotlin, that's a good point.


If you don't plan it, what about Java 8 ? Now, you bundle a Java 8 JRE for OS X, so I suppose that it's no longer a problem, right ?
I was wondering that because today, I tried to compile IDEA but it require JDK 6 and Oracle is like "bad bad bad !" about it ha ha.

0
Comment actions Permalink

We do not plan to convert the entire IDE to Kotlin. We plan to switch to writing most of the new code in Kotlin, and to convert code which is actively modified, but converting old code which doesn't need to be modified into Kotlin serves no good purpose.

We're not using Java 8 for the same reason as before: we want to preserve the ability to run IntelliJ IDEA 15 under Java 6 on Mac OS X for customers that experience performance and other issues with Java 8.

0

Please sign in to leave a comment.