From IntelliJ IDEA to Eclipse (3)

Today I’ll be clearly positive towards Eclipse and critical to IntelliJ IDEA. I have a lot of other stuff (originally saved for this part), but today I’ll make it short. I really found one area where Eclipse beats IDEA without any doubts!

It’s really been for some time I have this code on my disk (just lately reformatted for your better reading):

/**
* This lovely class is simple Hello world like program - but IntelliJ IDEA can't understand it.
* I guess this is the area of Java development, where Eclipse is clearly better!
*
* public class Hi {
* public static void
* main(String[]
* args) {
* System.out.
* println("Hi"); }}
*/
\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0063\u006c\u0061\u0073\u0073\u0020\u0048\u0069\u0020\u007b\u0020
\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0076\u006f\u0069\u0064\u0020
\u006d\u0061\u0069\u006e\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u005b\u005d\u0020
\u0061\u0072\u0067\u0073\u0029\u0020\u007b\u0020
\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074\u002e
\u0070\u0072\u0069\u006e\u0074\u006c\u006e\u0028\u0022\u0048\u0069\u0021\u0022\u0029\u003b\u0020\u007d\u007d

You have to know that when the compiler looks at the code, one of the first thing is to translate all Unicode UTF-16 escape sequences to characters – and after that it goes on with anything more sophisticated. Check the part in JLS here.

Isn’t the code lovely? And now how ugly IDEA treats this awesome product of years of experience in Java? Check this animated GIF:

Idea Unicode Code

Idea Unicode Code

Eclipse – on the other hand – clearly understands the code, underlines errors, and if I dared, maybe it would even refactor something (not sure if the result would stay in Unicode escapes though ;-)). Check it for yourself!

Eclipse Unicode Code

Eclipse Unicode Code

I don’t think anything can be added to this. Stay tuned for the next part where things will be a bit different. 🙂

Don’t miss other posts on this topic:
Eclipse vs IntelliJ IDEA
From IntelliJ IDEA to Eclipse (2)
Why to synchronize with SVN in Eclipse?
From IntelliJ IDEA to Eclipse (4)
From IntelliJ IDEA to Eclipse (5)

Advertisements

About virgo47
Java Developer by profession in the first place. Gamer and amateur musician. And father too. Naive believer in brighter future. Step by step.

3 Responses to From IntelliJ IDEA to Eclipse (3)

  1. Pingback: From IntelliJ IDEA to Eclipse (4) « Virgo's Naive Stories

  2. Common Developer says:

    What a shitty reason! Dude if you want to write a code that ‘only’ machine can understand then please use assembly language. Java is meant to be read and understand by humans.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s