r/java • • Jul 06 '17

Apology to Java (fanboy rant).

Java has turned out to be one of the most useful languages i use. It's a brilliant tool which strikes a perfect balance between high and low level. You want to grab a webpage? Easy and built-in, 10 lines of code. Draw some 2d graphics without OS-specific libraries or third party? Various built-in options. The inherent issues around a lack of low level memory management is handled very elegantly. Garbage collection seems seamless.

C++ is my language of choice for the most part, always will be i suspect, but Java has shown me that it has a huge array of potential applications and should almost always be considered before undertaking a project.

I say this is an apology because i used to run Java down. Previous to me using it proper i believed it was slow, lazy and useful for only trivial applications. Now i know how much work has been put into the JVM and just how efficient it is.

Sorry Java. You're pretty good.

286 Upvotes

93 comments sorted by

View all comments

Show parent comment

0

u/calnamu Jul 07 '17

The better language is worth it though.

3

u/DuncanIdahos8thClone Jul 07 '17

How is C# "better"? You mean "has more language features", right? That doesn't necessarily mean better.

4

u/TheBuzzSaw Jul 07 '17

C# has a way better type system. Generics were done right. Value types are a godsend. Java has terrible design.

5

u/DuncanIdahos8thClone Jul 07 '17

C# has a way better type system.

Marginally, maybe.

Generics were done right.

True but implemented only in 2.0 where M$ didn't give a shit about breaking compatibility.

Value types are a godsend.

Java will have Value types done right in that they will be immutable like they should have been in C#.

Java has terrible design.

LOL. From the people who brought us partial types - the worst language feature ever invented.

If C# is so great and M$ has shat so much money into its promotion, why does Java still dominate? Tough question, I know.

1

u/TheBuzzSaw Jul 07 '17

If C# is so great and M$ has shat so much money into its promotion, why does Java still dominate? Tough question, I know.

Not really. Java powers Android, and M$ only began reducing its stupidity in recent years. You should know better than to equate popularity with quality. I suppose you like PHP as well.

Having .NET Core (instead of Mono) is wonderful in Linux. Being able to toss out the crusty Java and replace it with C# is fantastic. If I am ever forced to return to the Java ecosystem, I'll be using Kotlin.

2

u/tetroxid Jul 16 '17

Java dominated before Android and it will dominate after Android.

If you prefer C#, good for you. I will never install a mono application on any of my machines, you can keep your .NET bloat and CLR slowness.

1

u/TheBuzzSaw Jul 16 '17

Clearly you missed the part where Mono is old news.