Java

I always have to realize that Java is still the best all around language. You can use it to literally anything other than making games. Yes, you will have a big end product, possibly with a packaged JRE, so your program is minimum ~170-200MB, not as sexy as a 1-2MB executable made with C, but come on, no one cares if it works in the end (also note that with Java9 this will improve significantly). The performance is also - not looking at start-up times - comparable to C. In the end, you get a product that runs almost everywhere (if you dont start doing stupid shit). Also, for OOP hating fags, you don't have to follow all that bullshit some Java library does, you can write beautiful code in Java without it being too bloated.

Other urls found in this thread:

stackoverflow.com/questions/7674839/is-the-jvm-a-compiler-or-an-interpreter
twitter.com/NSFWRedditVideo

Most of the Java hate is probably from people working on ancient enterprise code. I'm sure there's a way to write beautiful Java, but I've never seen it in the wild.

>170-200mb compared to 1-2mb, says don't care
Please kill yourself

Yes, some old libraries and code I had to maintain also made me puke, but people should just realize that it is not the case anymore. With Java8 streams your code looks sexy again.
Try doing a cross platform program in C++ and compare the results. Also fags here usually like Python, but you have to package the Python runtime too and you use a language that much slower than Java.

Making cross platform programing is for paeejet programmers, you should a full optimazed program for each plataform you want it to run

Java is a bloated piece of cancer.

> With Java8 streams your code looks sexy again.
The fuck is wrong with your perception, it actually made things even worse.

Let's say you develop a desktop application for a business, they use mostly Linux desktop, they are totally satisfied with the product, but one day they get a new PC with Windows because they need use some programs that are only available for M$. They want to install your application too, because it is needed for their work.
You say "It will cost you this much".
I say, "No problem, it works".

>The fuck is wrong with your perception, it actually made things even worse.
Tell me more really, I am interested, how did it made things worse. (I am not being sarcastic)

I don't know you but I cannot sleep at night knowing that I didn't make my best job.
So yes true an average business you will have the upper hand that's why I'm working with clusters not shitty comercial business

I don't understand what you mean by not doing the best with Java. You mean performance? As I said, you really need to fuck things up to make the Java version much slower than the C. As for other things, I don't know. Especially for server side computing, Java was literally made for that. Check Hadoop, Apache Ignite, Hazelcast.
(Also, it is good to have some flexibility with your server application, with Hazelcast you can build a cluster, where one node is a Windows server and another one is linux).

Wait, I can't make games with Java ?!

>You can use it to literally anything other than making games.

You can make games too. Java has great game libraries.

I never tried, so maybe things changed. Just the fact that nowadays everyone is using Unity to write indie games made me think that it is still the case.

It's really not that much extra effort to make sure your code is cross-platform. Just don't use platform specific libraries, etc. Maybe 15 years ago that was easier said than done, but there really aren't that many cases (a notable exception being GUI) where you *have* to use platform specific code -- and Java would probably struggle in these cases, too.

And when you do write platform specific code (such as GUI), you can almost always factor out the platform-specific shit and create a common interface to it for the cross-platform code. If you do MVC (or a competent alternative) pattern like you should be doing, this should be easy as fuck (and why is it so hard for so many people to use MVC? Holy fuck this is not a new idea).

And native GUIs are almost always better than any shit Java puts out.

The only place Java makes sense is enterprise where the poor users get burdened with shitty software because it still works (even if it works like shit) but you don't give a fuck because they have no say in what software they use.

And Java software is almost always shitty. Why? Because it's tedious as fuck to do anything right so programmers are constantly half assing it. Example: exception abuse. Java provides shit facilities for managing your intentions, so how do people do it? Mix all their shit up with exceptions. This is unlike C++ which provides pretty much every solid way for managing your code possible to make sure your code gets to where it's supposed to be in the way it's supposed to be, leaving exceptions for appropriate things like db transaction errors or wtfever (not that I'm a C++ bro, I just appreciate its massive support for expressing code in pretty much any imperative way there is).

Nope. Java was really made originally for "write once, run anywhere," for example -- cable boxes (literally what Sun developed Java for). The box might have different components, but it doesn't matter, just write Java interpreter for the box and run all the same Sun OS on it -- and it was understood this would apply to PDAs, other mobile computers, etc.

Java on server didn't even make sense, as you're usually in control of that shit and the overhead of the JVM (the overhead is inconsequential now, but wasn't 25 years ago) didn't make sense when you would be using C (just look at Apache HTTP server) for performance reasons. Java on the server came much later, and the "write once, run anywhere" is pretty niche in this application.

>Java interpreter
stackoverflow.com/questions/7674839/is-the-jvm-a-compiler-or-an-interpreter
> for performance reasons
Again, give me some solid proof that you can make a difference with C assuming you have the same functionality. As I said, look at some Java clustering.

Do note I was speaking historically.

>so your program is minimum ~170-200MB, not as sexy as a 1-2MB executable made with C, but come on, no one cares if it works in the end

I can't tell if this is satire or not.

>Example: exception abuse
Like you mentioned, it is an abuse, not the correct way of doing thing in Java. Using your logic C++ sucks because there are people who using it wrong. Seems legit.
>Java GUI
Yes, desktop applications with GUI is the weak point of Java, but one could use JavaFX2 to make a quite impressive GUI (formatting with CSS, similar to WPF). (Or there should be some magic with Chromium, but I did not anything like that yet)

If that application loads something changes some basic data who cares?

If performance / power consumption means $$$ - if they do high frequency trading and such gl with java lol.

You're skipping my argument that shitty language design choices leads to its abuse.

C++ gets around it by not being created for shitty programmers to use. This is both a pro and a con.

If you want proof of Java's deficiencies, go through the Stroustrup C++ book, pay attention to the subtleties of the features it introduces -- these subtleties provide for distinctions in meaning that Java just completely ignores -- and do your best to recreate these distinctions in Java. In some of these cases, abusing exceptions really is just the easiest way to do that. And this is just the low hanging fruit.

It's difficult to provide a concrete example, it's something that must be "felt" to appreciate and I cbf to create examples for a fucking image board.

And I'm not trying to C++ fanboy here -- it's fault is that the only way it knows how to overcome these issues is throwing every fucking possible feature into an unwieldy mess.

>Java is still the best all around
Around loo pajeet.

Javafx has everything you would ever need to buy an aesthetic and productive desktop application. It's even portable to Android without much efforts.

It's a shame dinosaurs wouldn't let swing/awt go and die.

Desktop GUI should be done natively, and any attempt to cross-platform it in one go is going to be shit.

GUI should really have some time spent following the conventions and sensibilities of the target platform, taking care to follow the target's human interface guidelines. SWT doesn't count.

This provides for the best UX, and even if all the code behind the GUI is the same, makes the difference between a user thinking your app is a piece of shit (and it is), or a premium product. It makes a difference.

Java is a lot like a Swiss Army Knife. It can do a lot of things, but full tools (ex. saw, screwdriver) are better for their specific job.

I'm a hobby programmer but I'm looking into CS as a backup career path. I learned programming mostly with python and did a lot of web dev in ruby, but I'm looking at a lower level language for mobile and desktop development.

Specifically I'm looking at Java and C++ and have a hard time deciding what to focus on. C++ seems nice because of the speed and compilers, but for android development Java seems the way to go.

I'm not really experienced in either so I have some noob quesitons. Can you compile Java? Can you develop mobile apps with c++ to the same degree as Java? which do you guys prefer for all-purpose?

>a business, they use mostly Linux desktop
prove this happened anywhere, ever

Java over C++ IMO, even if I shit all over Java. C++ has a steep as hell learning curve, and unless you have an idea of why you want to use C++ over Java, you'll be productive far more quickly and with less effort in Java. C++ will require a lot of background knowledge on PLT to really grok fully (it's often said that C++ is actually two languages -- one for library implementors and one for library consumers).

>unless you have an idea of why you want to use C++ over Java, you'll be productive far more quickly and with less effort in Java
thanks, this is what I've been reading about. C++ seems more applicable to resource intensive stuff like games, although I do like the "leanness" of it over the bloat Java requires to run.

I know one business where they use Linux mainly (they don't have to buy any software that way). Mostly small and medium businesses use Windows and Mac.