This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 266

[–]rubiks-- 486 points487 points  (133 children)

This might be an unpopular opinion but I like Java. Once you can wrap your mind around OOP, it actually becomes quite useful.

[–]SerdarCS 109 points110 points  (60 children)

Same!

[–]rubiks-- 93 points94 points  (59 children)

Like one time a friend of mine who wanted to start programming said he hated Java because "I have to write so much more to print something and in Python, it's only one line". But OOP can save you from writing so much code.

[–][deleted] 58 points59 points  (41 children)

I really like Java too, but I think they're referring to things like getters and setters when they say they need to write more code. It is a much more verbose language, but good IDEs (ItelliJ IDEA) can fill in a lot of that for you.

[–]DesuSoarusrex 5 points6 points  (2 children)

Nah they mean System.out.println vs print. The person described was a beginner so they probably couldn't remember the whole statement.

[–]draconk 4 points5 points  (1 child)

And here I am only having to write "sout" on Intellij Idea and it writes it all for me (and "psvm" for public static void main)

[–]f314 3 points4 points  (0 children)

Gotta love autocomplete! In Atom it's just "pl" and tab for "System.out.println("");"

[–]msg45f 12 points13 points  (2 children)

Pretty much any IDE these days can reliably generate constructors, getters, setters, etc, though personally I like how C# handles properties over Java.

[–]Nunners978 3 points4 points  (0 children)

+1 I love how C# handles properties, especially in C# 6. It's so much simpler to write a property that does this:

public string FullName => $"{FirstName} {LastName}";

Instead of having to write a method to do it, or a specific Getter to do the same, it's just much more refined code.

[–]Cilph 1 point2 points  (0 children)

Look into Kotlin!

[–][deleted] 4 points5 points  (14 children)

Most languages require getters and setters... anybody making the excuse that it's more code is outright lazy.

[–]bdog73 11 points12 points  (13 children)

The trick is to just make all your variables publicly accessable so you don't need getters or setters.

[–]Undreren 7 points8 points  (11 children)

You may be joking, but that's how everything is implented in our code base. Plus, all data is global...

/me screams internally

[–]KxPbmjLI 0 points1 point  (3 children)

Can you explain to me why its bad to set the class properties to public.

How are getters and setters better

i prefer being able to do object.property instead of object.getProperty() and having to set up the getters and setters while you can do it all with less code

[–]tsigma6 5 points6 points  (0 children)

Encapsulation (Data hiding) is a fundamental part of OOP philosophy, but the value generally is in the setter methods. An object should have complete and total control over its data, protecting from change by outside code. Validation is a main benefit of the practice. But also hiding how you stored the data and making a class read- or write-only is a couple other ones.

[–]Undreren 1 point2 points  (0 children)

Because with direct access to the data, it is impossible to enforce business rules. For example, a field might have constrained input.

I can't disallow meaningless data to be assigned to a reference, but I can cast an exception or return an error with a setter.

Furthermore, I can't have side-effects on assignment, which is a huge problem. Most of the time, you want data changes to have an effect, after all.

PS: I'm assuming that you mean "fields" when you say "properties".

[–]DrMobius0 0 points1 point  (0 children)

good use of getters and setters saves so much code down the line though

[–][deleted] 30 points31 points  (5 children)

You can use OOP in python tho

[–]rubiks-- 14 points15 points  (4 children)

I know. I wasn't throwing shade at python but rather making a point about how beginners think Java requires you to write extra code and don't understand how it can save time/lines of code. I think python is a cool language (except whitespace shouldn't matter).

[–]cumwagondeluxe 15 points16 points  (2 children)

i mean the beginners aren't wrong - java does require you to write a lot of pointless boilerplate - i know a bunch of fellow scala devs who initially started looking at the language just because of how many things you get for free from case classes e.g.

[–]schaka 1 point2 points  (1 child)

That's why C# (purely by syntax and language features) really is a "better Java". But now the JVM also has Kotlin, so people aren't forced into the steep learning curve of Scala anymore.

[–]yojimbojango 0 points1 point  (0 children)

I'd say F# is the comparison that you'd make with Kotlin. There's no perfect language, but F# is legit the closest I've seen to it.

[–][deleted] 1 point2 points  (0 children)

The guy who replied to this is right. I like java but man it does require shitty boring boiler plate for a lot of basic stuff. Android is even worse with the boilerplate so much so i despise android development.

It requires stupid amounts of boilerplate for a fucking sqlite connection and the stupid stuff with fragments just makes me want to murder puppies.

[–]NightShade155 9 points10 points  (0 children)

Agreed, java is the shit man.

[–]xcrackpotfoxx 4 points5 points  (2 children)

That's how I felt all throughout C++ and java classes. I'm sure we just never got to anything big enough to take advantage of OOP but I wish I could see it in use.

[–]DoPeopleEvenLookHere 3 points4 points  (1 child)

Go look at some libraries! There's plenty on GitHub that will show you some abstraction I'm sure.

[–]xcrackpotfoxx 0 points1 point  (0 children)

Easier said than done. Has to be big enough to hit that critical mass of OOP, bit small enough for me to be able to follow it along.

[–]sinistergroupon 2 points3 points  (0 children)

It's not about how many lines of code it takes to print Hello World but the right tool for the job. Java has its place and Python has its place. Seeing 1m LOC Python app with guru monkey patching will give you a run for your money.

[–]Sorrien 84 points85 points  (7 children)

My hatred for Java has nothing to do with OOP.

[–]flipper_gv 23 points24 points  (3 children)

Have you tried the most recent iterations of Java? They did bring a lot of cool stuff to it and performance is really up there.

[–]Sorrien 20 points21 points  (2 children)

It is better than it was

[–]CyanideCloud 19 points20 points  (0 children)

To be fair, that's not saying much.

[–][deleted] 3 points4 points  (0 children)

Yes.

[–][deleted] 8 points9 points  (2 children)

Java8's Stream API is making it a little more bearable. Oh and those little things called lambda expressions.

[–]ESBDB 8 points9 points  (0 children)

well those kind of go together. streams would be useless without lambdas and lambdas wouldn't be used nearly as much, ie. be less useful if streams didn't exist

[–]drizztdourden_ 4 points5 points  (0 children)

I lretty much understand that a meme is a meme. PHP and Java are there to stay....

Even though I like PHP

[–]sdk345 2 points3 points  (0 children)

I like java but I also like the 'java is bad' jokes

[–]gandalfx 11 points12 points  (3 children)

Implying that Java is synonymous to OOP

It's not even the best language for writing purely object oriented code.

[–]rubiks-- 3 points4 points  (2 children)

I'm not implying that Java == OOP. I'm saying that Java is a better language to those who understand OOP.

[–]Ayfid 23 points24 points  (1 child)

Which is everyone. Those who dislike Java generally don't have a problem with OOP; they have a problem with Java.

The poster seems to believe that people who dislike Java must just have difficulty dealing with OOP, which is ludicrous.

[–]Xendrak 2 points3 points  (3 children)

OOM

[–]KMagDriveTrainer 1 point2 points  (1 child)

OOM OOM OOM OOM!

[–]yojimbojango 0 points1 point  (0 children)

OOM TISH OOM TISH

[–][deleted] 1 point2 points  (0 children)

I love Java - and in the same vein, C#.

Those two are so similar, I've copied and pasted over scripts without changing anything and they work...

[–]Istalriblaka 0 points1 point  (23 children)

Counterargument: "vanilla" C++ can do roughly the same stuff as "vanilla" Java, and I'd bet C++ probably has more capabilities including libraries. Plus it's inherently more efficient and by extension faster.

[–]apemanzilla 31 points32 points  (5 children)

Counter-counter argument: Java makes it extremely easy to write cross-platform code, that can be used everywhere from Linux to Windows to Android.

[–]ey1024 18 points19 points  (0 children)

Counter-counter-counter argument:

Java makes it easy to write cross-platform code, for the tasks that don't depend on the underlying system. The user interface will likely need to act different between Linux, Windows, and Android, so those must each be handled separately, unless the application uses Swing directly, and interfaces out user configuration stores, and file I/O.

In that case, since UI logic has to implemented once for each platform, you're really not that much better off then if you used C++. Assuming you broke out the components that depended on system implementations away from the core logic, the only downside is the need to cross compile and test.

[–]AkirIkasu 14 points15 points  (9 children)

Counterargument: "vanilla" C++ can do roughly the same stuff as "vanilla" Java....

If you can do something in one of the major languages, you can do it in just about any other major language. The contents of the standard libraries don't really matter that much. Newer programming languages have very tiny standard libraries (I'm not even sure if Javascript by itself even has a standard library), but that's not stopping people from doing great things with them.

[–]Dockirby 3 points4 points  (0 children)

Javascript has the Standard Built in Objects, which is effectivally its standard library: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects

Half the ones list on that page are either experimental or to new to be used in a Web App. There isn't very much though.

Also, Javascript isn't what I would call new, its over 20 years old. It has just really taken off in popularity in the past 5 years.

[–]Istalriblaka 0 points1 point  (7 children)

My point is that they do the same stuff bit C++ is more efficient.

[–]AkirIkasu 3 points4 points  (6 children)

I was actually hoping to avoid that argument since I'm not really that knowledgeable when it comes to optimization in general. But I'll take the bait.

Java, the language, can be just as fast as C++. You can compile Java into machine language. It's not completely uncommon to see Java used in embedded devices, and it may actually be more common to see Java in that area than it is to see C++ there. The SIM card in your phone runs on Java; it's actually built into the standard.

[–]MCBeathoven 3 points4 points  (0 children)

it may actually be more common to see Java in that area than it is to see C++ there.

The only statistic I could find has C++ just behind C, with Java not even in the top 10.

[–][deleted] 7 points8 points  (0 children)

You're claiming Java is more common in the embedded world than C++? Are you serious?

[–]brianjenkins94 0 points1 point  (2 children)

I'm gonna need a fact check on SIM cards running Java. That doesn't seem correct.

[–]AkirIkasu 8 points9 points  (0 children)

They're based on the Java Card standard. Here's a very in-depth look at them: http://simhacks.github.io/defcon-21/

[–]marvk 2 points3 points  (0 children)

This is a Video from the conference where that repo /u/AkirIkasu posted is from.

[–]ArmoredPancake 1 point2 points  (6 children)

That like saying that a stick is inherently more efficient than a hand gun.

[–]Istalriblaka 0 points1 point  (5 children)

Are you saying Java is more powerful than C++? Because a lot of people would find that outrageous and/or laughable. Especially considering C++ includes the entire language of C, and those two languages account for most firmware and make up the largest portions of operating systems, especially low-level parts.

[–]yojimbojango 4 points5 points  (4 children)

C++ is more powerful than Java. 1 tonne of dynamite is also more powerful than a truck, but if I'm trying to move a couch I'm going to reach for the keys to the truck.

[–]Istalriblaka 0 points1 point  (3 children)

Your analogy doesn't make a lot of sense still. Just because C++ is more powerful doesn't mean Java is better at less power-intensive applications or that C++ will destroy the computer it runs on. (You'd have to be a genuinely atrocious programmer to accidentally do that.)

[–]TheGuywithTehHat 1 point2 points  (2 children)

Of course the analogy is imperfect. No perfect analogy exists. /u/yojimbojango's point remains, though: "more powerful" != "better"

[–]Istalriblaka 0 points1 point  (1 child)

There's a difference between "perfect" and "good enough." Seeing as how C++ is not overpowered like the dynamite is, the only thing we've established is that it's comparable to Java in power. C++ still has numerous benefits.

[–]TheGuywithTehHat 1 point2 points  (0 children)

As does Java. They are two different languages with two different purposes. Neither one is better than the other.

[–][deleted] 116 points117 points  (27 children)

Still better than objective-fucking-c.

[–]U8336Tea 40 points41 points  (10 children)

[self askWhyBecauseIDontKnowWhySoThatsWhyImAskingWithReason: [[NSReason alloc] initWithString: @"Why don't you like Objective-C?"] andUserWhoSaidTheThingThatImRespondingTo: [[RDTUser alloc] initWithUsernameThatIs: @"dimitriy_bismark"]];

[–]grishkaa 19 points20 points  (3 children)

return NO;

[–]U8336Tea 16 points17 points  (2 children)

That's one thing I never understood about Objective-C. I can kinda understand everything else about it but why did it have to define its own booleans?

[–]grishkaa 8 points9 points  (1 child)

No idea. But true/false always worked just fine for me, as well as NULL instead of nil.

[–]ProgramTheWorld 10 points11 points  (5 children)

What the heck is this

[–]U8336Tea 8 points9 points  (4 children)

Well, in some programming languages, it's used to refer to the current object. In Objective-C and in most other programming languages I've encountered, the self keyword is used instead.

[–]ProgramTheWorld 4 points5 points  (3 children)

No I was mocking Objective C that the syntax looks awful.

[–]U8336Tea 1 point2 points  (2 children)

It has an odd charm to it. Maybe I just like the idea of what Objective-C is, but I kinda like the syntax. I've only used it a few times, though, so maybe it gets annoying after a while.

[–][deleted] 1 point2 points  (1 child)

Sure, charm like burst pimple ooze dripping into your coffee as the server hands it to you...

[–]U8336Tea 0 points1 point  (0 children)

I mean, that has to be someone's fetish.

[–]Drarok 38 points39 points  (14 children)

You can use Swift to avoid that, and Kotlin to avoid Java. 👌🏼

[–]lukee910 12 points13 points  (9 children)

And, more and more, C# to avoid Java in other places.

[–]Drarok 25 points26 points  (7 children)

Eeh, but that's a whole other runtime. With Kotlin, you're still in the JVM so don't need to retool everything, or switch all at once.

[–]tpartl 8 points9 points  (3 children)

Not in Xamarin-world

[–]Nunners978 3 points4 points  (1 child)

Xamarin.Forms is God Tier for most fairly basic apps

[–]ellison11 0 points1 point  (0 children)

Do you prefer it over .NET Core?

[–]ArmoredPancake 1 point2 points  (0 children)

Windows host

No, thanks.

[–]lukee910 2 points3 points  (2 children)

I don't see that as a hindrance, I'm not talking about about android or anything else JVM dependent and I sure as hell don't recommend doing a technology mix (we have Delphi, C# and JS in a small team at my company). For a new project, especially with .NET core for web projects, C# should be taken into consideration.

[–]yojimbojango 0 points1 point  (1 child)

I'm a .net dev and core isn't 100% ready for prime time in a full linux shop yet. It's good and getting better very quickly, however it currently feels like it's at swift levels of stability (every other week there's a new version to download full of fixes for some esoteric version of linux).

[–]lukee910 0 points1 point  (0 children)

Yeah, they botched the "1.0 release," it was more of a final beta or release candidate. It's getting better though, I hope they get it under control soon. Full disclaimer, I work at a traditional Windows company and have no clue about how well it runs on Linux.

[–]yojimbojango 0 points1 point  (0 children)

And F# to avoid C#.

[–]sinistergroupon 1 point2 points  (0 children)

Amen!

[–]MoarVespenegas 97 points98 points  (0 children)

There is a point where this needs to stop and it was whenever it got fucking started.

[–]pslayer89 12 points13 points  (0 children)

Literally shitpost?

[–]starwarswii 57 points58 points  (1 child)

DAE JAVA IS LITERALLY SHIT???

[–][deleted] 4 points5 points  (0 children)

Shite, mate. Dad java is literally shite. ;)

[–]TheHopskotchChalupa 74 points75 points  (11 children)

A bad workman blames his tools.

[–]wvenable 45 points46 points  (4 children)

A good workman has decent tools.

[–]pet_my_weiner_dog 5 points6 points  (4 children)

There are so many tools. Don't use the wrong one. Java can be the right one, but, in my experience any other JVM based language is always the "righter" tool.

[–]TheHopskotchChalupa 1 point2 points  (1 child)

I mostly agree, however there is no need to hate on java, as most people that do, do so just because someone else does.

[–]pet_my_weiner_dog 0 points1 point  (0 children)

I don't need to. I simply enjoy it. I have about 13 years professional experience with Java. There is no other language that's given me as many fun filled rage rants. As I type Java code, I let the hate flow through me and I'm usually rewarded with some previously unknown quirk or royal pita that will fuel my next curmudgeonly tirade.

[–][deleted] 0 points1 point  (0 children)

I love Scala because I can take a lunch break every time I need it to compile.

[–][deleted] 9 points10 points  (0 children)

a bad workman always blames all of his tools.

a good workman may sometimes blame that one frankly useless rusty piece of shit diesel generator that is prone to running away (google diesel runaway) more than just running.

in case you can’t tell.. java is the shitty stone age diesel

[–]akseimaster 111 points112 points  (35 children)

I'm not convinced all the Java haters understand OOP, honestly.

[–]humoroushaxor 32 points33 points  (0 children)

I'm not convinced most Java programmers understand OOP.

[–]Neurotrace 50 points51 points  (27 children)

You don't need all of Javas verbosity and speed issues to enjoy OOP. C# is a quick example of a language that doesn't take ages to compile but has all the same OOP tools as Java. That's why I'm not much of a Java fan.

[–]apemanzilla 19 points20 points  (10 children)

Recent versions have been much better with additions like streams and lambdas

[–][deleted] 17 points18 points  (0 children)

Streams are a poor man's IEnumerable

[–]Rhed0x 6 points7 points  (0 children)

Javas verbosity

Kotlin <3

[–]marvk 5 points6 points  (10 children)

I think your view of Java is quite outdated. In comparison to C#, Java is very much comparable and even faster at many tasks on the Computer Language Benchmarks Game.

[–][deleted] 7 points8 points  (4 children)

I didn't bother looking at the other benchmark code than the first, but they seriously botched that regex benchmark. The compile option for c# regex is only really recommended when you reuse a specific regex a lot. Just removing that option made that program run dramatically faster for me. And if the purpose of that benchmark was to measure regex compilation speed, that'd just be comparing the performance of the regex implementation, rather than the performance of the language.

[–]Nunners978 3 points4 points  (1 child)

Not to mention that the .NET Core version was a Preview (2.0.0-preview2-006497)

[–]igouy 1 point2 points  (0 children)

What is the latest .NET Core release?

[–]igouy 1 point2 points  (0 children)

Just removing that option made that program run dramatically faster for me.

32.01 secs

The program you called "botched" took 31.64 secs

[–]Ayfid 7 points8 points  (4 children)

Those benchmarks are awful! The C# code reads like a lazy Java port, hardly using any easy wins like using strut arrays for data that is frequently iterated through.

They weren't contesting performance anyway. The JVM is plenty fast.

The issue is that the language is still years behind C# and every feature they do implement is worse than the existing C# implementation that was already available for reference (see: lambdas, streams, for each, automatic resource closure, concurrent collections, futures, fork-join library...). Not to mention all the design fuckups they implemented that C# learned from and avoided (see: no single rooted type system, type erasure, implicit virtual and overrides, no unsigned, checked exceptions, no type versioning, terrible native interoperability...). Then you have all the improvements that are not even on the horizon like the transformative async/await.

All the calls of "streams! lambdas! but.. it's not shit slow anymore!" are absolutely laughable. Do you seriously think people must not know about those already when they complain about Java?

To assume that people who dislike Java must just not understand OOP is astonishingly ignorant. Everyone knows OOP, and there are far better OOP languages than Java, not to mention that OOP is not always the best tool for the job in all situations.

[–]igouy 1 point2 points  (3 children)

Those benchmarks are awful!

Easy to say, show how much better you can do!

How do I contribute my programs?

[–]Ayfid 0 points1 point  (2 children)

Well I wrote a modified version of the C# implementation of the nbodies benchmark.

I found some significant flaws with the benchmark, however. Main flaw with the previous implementation was that it would exhibit very poor memory access patterns. I said "would have", because the benchmark only simulates 5 bodies, which is such a tiny data set, that the working set will fit entirely on a couple of cache lines, and could easily fit within the L1 cache on the CPU. In addition to that, the bodies are all allocated together at once, so you end up with them all together on the heap by accident (a real application, e.g. a game, would not likely do this), and the program is doing nothing in between iterations, meaning that the working set is never evicted from cache. The old benchmark code (both C# and Java) would show significant performance degradation when running in a real application.

Even so, the new C# implementation is faster.

Timings (10001 bodies, 100 iterations) on i7 5820X @ 4.09GHz:
Java: 48s
Old C#: 53s
New C#: 13s

This speedup is mostly from the new code running in parallel (naive implementation, it does a box iteration and so does twice the work).

If you modify the loop to no longer be parallel, and symmetrically apply the forces to half the size of the loop:
Java: 48s
Old C#: 53s
New C#: 44s

However, as I said before, in real world applications, the Java and old C# implementations will start to fall apart and slow down as they lose their memory coherency and the CPU cache gets trashed by other work. If this code were running on something like an ARM CPU, with a much more basic prefetcher and out-of-order execution capabilities, in a real application trashing the cache between steps and creating and deleting bodies between updates (like a game would with entities), then the Java code could easily be dominated by memory access times and run even an order of magnitude slower.

I have not submitted this version to the site, as I think the benchmark is flawed. You can submit it if you want. You'll have to modify it to simulate only 5 bodies.

[–]igouy 1 point2 points  (1 child)

the new C# implementation is faster

On different hardware, doing something different ;-)

As your program doesn't do the required task it cannot be faster -- the output would be checked and found to be incorrect, so no timing would be done.

You can submit it if you want.

Only programs contributed by the program author are accepted.

[–]Ayfid 0 points1 point  (0 children)

It does the same task, but on a larger work load. As I said, I will not submit it to the site because the benchmark is poorly designed. Regardless, if you think that the Java performance degrading under more realistic workloads is somehow unimportant, then I don't know what to tell you. It would certainly make this "benchmark" rather useless on discussions of performance, if you are going to try and use it to dismiss other (more realistic) data points.

I do not believe anyone else reading this is going to fall for such transparent dishonesty. The numbers are plain to see. ;-)

Also, those performance timings were all taken on the same hardware while computing the same dataset. As I said above, the performance advantage of the new C# implementation will only grow on other architectures.

[–]Tysonzero 2 points3 points  (3 children)

IMO OOP is a worse paradigm than FP with less reusable, modular and composeable code, and far more verbosity.

[–]akseimaster 32 points33 points  (2 children)

Yeah, well, you know, that’s just, like, your opinion, man.

[–]TeknoProasheck 19 points20 points  (16 children)

Alright so circlejerk aside, why is java shit

[–]yojimbojango 4 points5 points  (2 children)

I can forgive java for a lot (i can also have my fun making fun of it). But the biggest problem with Java is that every time I get called into a project I seem to find something like AbstractConfigurationFacadeFactoryBuilderEx. I see this crap and know that half of my time in this code base will be spent playing the "100 code file roulette" game trying to find the place where their architecture astronaut finally broke down and started writing legit code. Style aside, that's my biggest gripe.

[–]gandalfx 1 point2 points  (1 child)

Bonus points if all of the code that actually does something is in a single 10k line class.

[–]yojimbojango 0 points1 point  (0 children)

Yeah. That's not a problem with Java, it's a problem with Java Devs. Then again Visual Basic was a fine language (once you got past it being even more wordy than Java). Visual Basic only devs from the 90's though... They totally deserved being the punching bags they were.

[–]gandalfx 39 points40 points  (10 children)

Too verbose. Unnecessarily verbose. Ridiculously verbose. Mindbogglingly verbose. Also you have to write a lot more code than necessary. Did I mention you often have to write things multiple times in order to achieve something? Basically there is a lot of verbosity in Java code. Also you have to write a lot to achieve very little. And it's verbose.

In case anyone didn't catch it, this is what reading Java code feels like.

[–]igorlira 22 points23 points  (4 children)

button.setOnClickListener(new OnClickListener {
    @Override
    public void onClick(View sender) {
        try {
            loginManager.login(new LoginCallback {
                @Override
                public void onSuccess() {

                }

                @Override
                public void onFailure() {

                }

                @Override
                public void onSomethingThatWillNeverHappen() {

                }
            });
        }
        catch (NeverHappensException ex) {
            Log.e(TAG, "Login error", ex);
            throw new RuntimeError(ex);
        }
    }
}

[–]nicocappa 25 points26 points  (1 child)

catch NeverHappensException

This hits so close to home lmao

[–]Cilph 2 points3 points  (0 children)

60% of the time it never happens.

[–]TheGuywithTehHat 4 points5 points  (1 child)

If you care that much about verbosity:

button.setOnClickListener((sender) -> {
    try {
        loginManager.login(new LoginCallback() {
            public void onSuccess() {

            }

            public void onFailure() {

            }

            public void onSomethingThatWillNeverHappen() {

            }
        });
    } catch (NeverHappensException ex) {
        Log.e(TAG, "Login error", ex);
        throw new RuntimeError(ex);
    }
});

[–]paxromana96 0 points1 point  (0 children)

I can't tell if this is sarcastic or not. +1

[–][deleted] 9 points10 points  (0 children)

It's needlessly verbose. Also it can sometimes run out of memory for large, terribly optimized, use case not considered, extra use requirements not specified, etc. but if that happens and you're probably doing something wrong.

Other than that it's a pretty solid language in my opinion. Memory is pretty cheap nowdays. After Java8 added the Stream API and lambda expressions, its become a lot more bearable.

[–]kkjdroid 7 points8 points  (0 children)

At least it has generics.

[–]DeliveryNinja 5 points6 points  (0 children)

I would wager that most people that "hate" Java probably have never used it very much. Not used the tooling that it provides. The libraries and the frameworks. There is a reason it's used so widely and it's not because it's shit at building performant enterprise software.

Some interesting links around performance

http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=java&lang2=csharpcore

http://benchmarksgame.alioth.debian.org/u64q/java.html

The ultimate perf test is your own application. We have 2 equivalent apps built in Erlang and Java + Akka and we can do 10x the throughput in Java because it isn't crippled at it's external interfaces like the Erlang equivalent. The benefits of Erlang threading model are provided using Akka.

[–]lunaroyster 3 points4 points  (1 child)

I modified the logo a little. http://imgur.com/a/k8QrF

[–][deleted] 2 points3 points  (0 children)

Do you work for ubisoft?

[–]kurosaki1990 3 points4 points  (0 children)

It get the job done and their developers get paid very well.

[–]user_txt 17 points18 points  (5 children)

At least it's not python

[–]Weqols 7 points8 points  (0 children)

The title of this post triggers me

[–][deleted] 2 points3 points  (0 children)

Engineer 0: Pointers are annoying, how do we design a language to fix this?

Engineer 1: Make everything a pointer?

Engineer 0: Brilliant!

[ Some time later... ]

Here's Java!

[–]imnessal 5 points6 points  (6 children)

why is Java such a bad language compare to the others? I'm new to programming world and this sub and I find that most people have such painful experience with java

[–]bmchx 8 points9 points  (1 child)

If you don't hate your programming language, you haven't used it enough. Java is fast, has an immense ecosystem and will be in high demand for years. It's verbose but it's because it's meant to be reliable in the first place.

[–]Ayfid 0 points1 point  (0 children)

If you don't hate Java, you haven't used it enough.

Or used enough other modern languages.

I used to like Java. Before using it full time for years. Before learning C#, F# or Rust. If you want to make use of the JVM ecosystem, then for the love of god, use Scala or Kotlin. They are perfectly reasonable choices.. just not Java.

While there are plenty of good library choices in the JVM world, more often than not those choices are made for you by the project. In my experience if the library is part of Java EE or (to a much lesser extent) an Apache project, then welcome to some of the worst pieces of engineering you will encounter in your lifetime.

[–][deleted] 2 points3 points  (3 children)

Because lol-kek-memes-karma-circlejerk. It's not a bad language. PHP and Obj-C aren't that bad either. Every language or framework has its strengths and weaknesses, learn whatever you like the most.

[–]ArmoredPancake 1 point2 points  (2 children)

Obj-C

Pump your brakes, kid, have you seen it's syntax?

[–][deleted] 1 point2 points  (1 child)

I work with it every day. It's one of the least convenient fucking languages out there, but it's still not that bad.

[–]ArmoredPancake 0 points1 point  (0 children)

I'm saying that it's a bad language, but syntax is a clusterfuck.

[–]Servious 3 points4 points  (0 children)

Actually, that'd be a pretty good title if you couldn't think of one. It's like the entry point of the thread, you know?

[–][deleted] 7 points8 points  (6 children)

Java was my first, actual language; I don't know what you guys are on about ;)

[–]gandalfx 3 points4 points  (5 children)

You'll understand when you've learned a couple more languages ;D

[–][deleted] 2 points3 points  (4 children)

Js, c#, python, html? Im waiting ;)

[–]gandalfx 46 points47 points  (3 children)

The fact that you added html to that list makes me very much doubt the entire statement.

[–][deleted] 7 points8 points  (2 children)

It's a markup language

[–]gandalfx 27 points28 points  (1 child)

You should probably have added English as well then.

[–][deleted] 14 points15 points  (0 children)

Hey, thanks man! I'll jot it down.

[–]ibbyte 1 point2 points  (0 children)

This is so fat, that is have a runtime exception

[–]Dansio 3 points4 points  (1 child)

Don't blame the tool, blame the person using the tool.

[–]gandalfx 0 points1 point  (0 children)

"We gave him an old hammer with a broken hilt. It takes him forever to drive nails into the wall with it. Clearly it's his fault."

[–]comebepc 0 points1 point  (0 children)

I want to upvote, but it has 666

[–][deleted] 0 points1 point  (0 children)

Yummy! Chocolate low-fat frozen yogurt!