Go doesn't have the guts to replace Java, because of the hostile mindset of its community when it comes to writing reusable, general purpose libraries. the famous "you don't need that with Go" is something pushed by go maintainers themselves.
The best bet is .NET core. Microsoft can move quite fast on a project, just look at Typescript or VSCode. And there are already hundreds of thousands of C# devs if not more. C# and F# with .Net core on linux will certainly be the future of entreprise development when the RC mess is sorted out. And MS can still make money on expensive SQLServer licenses.
I don't think the latest JEE was that bad though. It tried to do away with a lot of unnecessary complexity.
Go has a pretty comprehensive stdlib. And a huge and growing community of 3rd party libraries. I left .NET and Java for Go around 0.9 and since then I have seen Go flower into an ecosystem I am far more productive than. The Go devs have a bias against complexity, they hate Abstract Factory Factory Singletons :P, but that does have much impact on community developed libraries. The Go community does have a strong bias towards libraries and against frameworks, but IMHO, that is generally healthy. The only concrete example of what you are talking about is the current lack of generics support.
(want generics? too bad! don't like the syntax for [thing]? too bad! want a framework? you're doing it wrong! want to test without using actual sending network traffic? BAM! 50 downvotes on SO for 'poor question'. Got some feedback and post it to golang nuts? HA! Prepare to be shouted out)
...but slowly we're seeing things move to a more moderate and mature state now where people are actually solving problems (like vendoring and SetDeadline()), rather than just pretending everything is ok, and building really good things with it, like go-kit.
It's just go growing up and being used seriously by people; but to be fair to the parent post, if you've used go in the past, I can see why you might have some opinions about it not being run by grown ups.
Worth having another look though. These days, it's pretty good.
There are also technical improvements (as I mentioned) and frameworks (as I mentioned). What more do you want?
Generics? No. You still can't have those.
Different syntax? No. You still can't have that.
...but maybe, now, if you go and talk to people about it, they won't flip the table about it, and you can have a conversation about it with folks on the gopher slack where everyone is reasonable and thoughtful both about legitimate concerns and future directions for change.
In my oppinion, that's a big deal...
Now Microsoft seems to be changing its culture, but I can understand if people are weary.
Maybe Go is a exception, but there's a lot of people happy to use it. (Yes, there's a lot of people happy to use PHP too. Those things always have exceptions.)
RC mess is already sorted out with RTM release, isn't it?
Instead, developers want to abandon the JVM platform. They actively seek new platforms and create them.
The damage is done.
Brian goes about how important compatibility is for the language, the concept not throwing customers code under the bus by bringing breaking incompatibilities. (ie Python 2 --> 3)
Java has its warts and isn't "cool" but I respect their design decisions.
Went there and found a single, totally obvious button labeled "Free Java Download" that detects your browser and Operating System and makes sure you download the proper version of the JVM.
How much easier could it be?
You cannot redistribute the installer or the installed files. Except other things it means, you cannot make a docker image with java app and redistribute it. Everyone has to download their own java installer and build images themselves.
Java (openJDK) is GPL licenced.
Plenty of software comes with Java embedded - ie. IntelliJ Idea. Last time I installed Java was on a digital ocean remote box and I did it through apt-get.
Java may have some licensing that cause some open source system distributions not to include it but that is really their game.
most applications put "oracle jre" in their dependencies though.
This is only true for Oracle Java, which is basically OpenJDK and some dev tools. OpenJDK is basically all you need and you can redistribute it or docker images with it. See http://zulu.org/
===============
Even if you are Day One brand-new to Java, page #1 in any book will tell you to download a Java Development Kit (JDK). Any Google search would take you straight to the download page for Oracle's implementation, which is fine.
The Oracle JDK does not include any "toolbar" malware. That's only an issue for the Oracle JRE download (i.e. the runtime without any compiler)... which page #1 in book will tell you not to bother downloading ever.
The JDK is open-source, based on the "OpenJDK" codebase (much like the difference between Chrome and Chromium). Oracle's binary build has some restrictions on redistribution (see below), but there are numerous other OpenJDK builds. Every Linux distribution has one, as does homebrew for OS X, and there are at least two for Windows:
http://www.azul.com/downloads/zulu/
http://developers.redhat.com/products/openjdk/overview/
In the past, there were enough differences between the base OpenJDK and Oracle's build that people were wary of using OpenJDK. As of Java 7, and especially now with Java 8, those differences are nearly zero.
REDISTRIBUTION
==============
You absolutely CAN redistribute Java. OpenJDK builds have no restrictions whatsoever. Oracle's proprietary runtime binaries are also redistributable, with the only real restriction being that you can't exclude certain files (i.e. they don't want crippled Oracle runtimes floating around that can't run core Java):
http://www.oracle.com/technetwork/java/javase/jdk-8-readme-2...
Not only are you allowed to redistribute even Oracle's binaries, but the latest JDK includes a "javapackager" utility. It bundles up your code, along with a stripped-down embedded runtime, with an executable wrapper so that you can distribute your app as a zero-dependency standalone (on Windows, OS X, or Linux). Interestingly, I've found that creating an installer for a JavaFX GUI application, with the runtime included, is slightly smaller than the installer for a similar GitHub Electron based app.
https://docs.oracle.com/javase/8/docs/technotes/tools/unix/j...
OpenJDK is in Debian main, and does not require user interaction.
2. What .NET open source community? I'm not aware of single significant open-source community project in that ecosystem that isn't a lagging imitation of something from the Java community (e.g. Akka.NET, MassTransit, etc). There's a lot of excitement around VS Code, and the possibilities of future stuff on .NET Core, but chatter on HN and Reddit isn't the same as actual shipped code.
3. If by "ecosystem" you mean web forums filled with college students chatting about it, then fine. But I think for most people, "ecosystem" refers to the availability of production-grade libraries and infrastructure components. Try naming one server-side niche in which Maven Centrals lags behind any other language in existence.
This has not been my experience at all. Java's ecosystem and vast libraries of battle tested software is unmatched on any platform.
That being said IBM is working on open-sourcing their core JVM technology to act as platform, not just for Java but other runtimes as well. [1]
There is hope still...
[1]http://www.infoworld.com/article/3014128/open-source-tools/i...
I still find it the gold standard of language/platform combos.
Granted, Maven Central has the advantage of Java being statically type checked.
But CPAN is awesome. And Perl is dynamic. But modules in CPAN are thoroughly unit tested when you install them.
npm is neither. You find incompatibilities when you run it.
Yet, java was (as someone recently disparagingly put it) "designed by adults". By people familiar with state of the art language research, what was needed and workable, comprehensive specs of language and VM, and complete stdlibs, docs and tools from the get-go. (That is, disparaging to other languages)
And it's also managed to keep up to date, much better than I'd ever have thought: fast JVMs, language evolution, stdlib extended - and perhaps the greatest number of 3rd party libraries of any language ever(?).
Oracle is wrecking that for EE, and may wreck more.
The truth is, J2EE 1.0 was not designed by grown ups. It was designed by college kids and academics who ironically enough wouldn't know the 8 fallacies of network computing if it but them on the ass.
Because it DID bite them on the ass and we have nearly 5 years of vendors flaunting and then polluting the spec to prove it.
Then we have Josh Bloch, who everyone but me thinks is great, who introduced Duck Typing to the JDK (MethodNotImplementedException) and only later confessed that he couldn't understand variance. People defend their bad code by pointing to similar code in the JDK, and Bloch stunted the growth of an entire generation of developers. Then repeated the exact same mistakes at Google.
Me, I'm waiting for a language that Bloch had nothing to do with, and I want to get back to working in limited resource environments. My eye is on Rust right now, and I have my fingers crossed.
This isn't a great comparison because C was, and still is, a much lower-level language than COBOL. If you're looking at that from the perspective of a large organization with millions of lines of code, it's hard to justify the claim that C is “technically more suitable”, because the things C does better are largely irrelevant to business apps while the ISO standard for COBOL includes a ton of higher-level features like an indexed database, first-class support for fixed-precision math (a hard requirement for financial apps), a form library, object orientation, etc. which would need to be maintained as library dependencies in C. Any COBOL programmer would be familiar those but each C developer would need to get used to each application's particular selection of libraries.
A better comparison would something like Java or .Net which both have standard answers for most of those questions and, perhaps unsurprisingly, were quickly adopted by companies trying to move new development away from COBOL. As far back as the mid-90s, a popular approach was to move the front-end into Java (or, later, a web app) and start chipping away at the decades of backend COBOL code running on a big central server.
Can OpenJDK create a fork of the whole Java ecosystem when Oracle wrecks it?
Love 'em or hate 'em, Oracle didn't turn into a factory farm of cash cows by being entirely incompetent.
My mother is a COBOL programmer for one of the largest banks in the EU, and I always enjoy listening to her explaining their systems (IBM Mainframe, Batch processing, etc).
I haven't missed generics that muc, but it would be nice to be able to do things like sorting without implementing a sorter interface.
I can live with this though because everything I've written in go so far had been easy to reason about and most importantly it "just works". I can read anyone's code an understand what it's doing. Can't really say that's been true in the 25 years I've been doing this.
I think the place where java still shines is JVM.There are myriads of JVM implementations out there which is suited for all kinds of purposes.And with the same flexibility ,there are functional languages like Scala or Clojure which targets JVM where all existing java libraries can be used for your new shiny language of choice.Of course .NET has F# or DLR (which I feel is another layer added on top of CLR and I couldn't like it).
What I see is .net has ports for most of the java frameworks or libraries e.g spring,hibernate,lucene,akka you name it. With .NET core being open and F# and C# being super awesome on it's territories (yes am biased :) ) ,we may have good contender to java in some more time.
Oddly, SUN got purchased by one of the few companies everyone hates more than Microsoft. That paired with MS's recent shift to open source and opening the dotNet platform has led to softer view of Microsoft overall.
And our log files had to be localized, which while Java is not perfect, few if any string interpolation libraries match it for being able to deal with written languages that have a different sentence structure than English. It was hard work and one of my coworkers had to invent a new linter to detect unlocalized text in our code, but I couldn't imagine fulfilling those requirements in another language.
They only go far enough to bait and switch you and then after they get you they cut funding for maintenance and the cross platform bits rot away.
.NET Microframework makes it runnable on IoT.
I'm also pretty sure that embedded Java is widely deployed in IoT applications.
PS4 (MonoGame/Mono) XBox One (.NET Core on the future and MonoGame/Mono)
At least you can run c# code on those platforms. Java though is unlikely to ever happen.
Java' documentation as I remember it is still better than Microsoft's.
In the java world there's something similar, but it is no designed from the start for several high-level language flavors.
OpenJDK still was a threat, so they're (MS) more inclined now to open source NET Core.
Today you can choose Java & NetBeans over .NET and V.Studio and will see only minor differences. I mean in tooling and architecture. Today Java seems closer to Open Source than MS, even if MS is "trying". Java & Netbeans are the same on Windows or Linux, of course NET is not.
Haskell people probably say the exact same thing about Java ;-)
While I mostly agree with you, Spring _IS_ J2ee based. (i.e. Servlets/JAX-RS both part of J2ee). Sure it doesn't use EJB but I don't think anybody does (non legacy) at this point.
Said mostly in humor (from long suffering):
The distinction between J2EE and Spring is pretty simple. EJB is a data persistence obfuscation library, whereas Spring's DI/IoC "framework" is an exception (stack trace) obfuscation library.
Of course Spring doesn't leverage ALL of J2ee but I wouldn't except anything to use all J2ee. There is a lot there.
Here in Brazil, the program used to submit the income tax forms is written in Java (http://idg.receita.fazenda.gov.br/orientacao/tributaria/decl...). This means that a lot of people need Java on the desktop. I have relatives which have Java installed on their computers solely for that reason (yes, I have disabled the Java plugin on their computers).
Kotlin is nice too though.
I guess, you don't miss what you don't know.
Richer generics. Dynamic typing is there if you want it. Type inference is great, and then coupled with anonymous types allows for some nifty tool-supported functional-style pipelined programming. (RX and Linq). Upcoming language support for tuples looks pretty sweet too.
Type inference, C# properties (vs. getters/setters in Java), generics are way better, and of course Linq.
Java 8 makes this a bit better with lambdas but it's still a bit of a pain not having the above present. I still like Java though.
Given it sounds like you use Java, what tools/stack do you use with it day to day?
Oh, by all the possible deities, how I wish that was even remotely true...
Although when not needed on a PC I tend to remove it asap (Java)
Don't know much about Python but at least for Ruby, the ecosystem is not "chaotic", it's just way faster moving compared to something like Java, which is stale af.
It's quite easy to manage Ruby projects, I think the only disadvantage to this language is it's quite slow. But does it really matter? For most use cases it's just fine.
As for the lack of type checking, I think that's a poor comparison. Type checked code is not always better than dynamic code, and dynamic code it's not always better than type checked code; They are different.
Maybe for an army of junior developers leaded by a 90's senior developer with a mustache and thick glasses, a boring safe language like Java is the best. For a team of experienced developers with deadlines, Rails can get the job done in a quarter of the time.
I guess, it depends on the application.
- I would not use Java for desktop applications.
- Not for small quick and dirty scripts that I will use once on a while. I use Perl for that.
- Neither for command tools. Start up times may be an issue.
- For server applications, java is great.
...unless it's not the main application run by the server (like in auxiliary services, message spooler, monitoring agent, some kind of cleanup service, stuff like that). Then its memory usage is a mess.
I'm not a software developer and have no dog in this fight. Sometimes I use Matlab's idea of OOP to factor out code by domain of representation (so simulations of agricultural yields are instances of a LandUnit object with some properties and one or two methods); never to abstract programming out the way OOP design patterns do.
I'm more attracted to the Haskell style of types and type classes, as far as "abstracting progrmaming out" goes, but I don't do any programming in the large, so what the hell do I know. I just pointed to the debate between people who should know, c2 wiki is very good on the things I do know.
I don't think there is a problem with the Java Language or the JVM.
But if you don't use OOP, what are you going to use that makes things significantly better? "There is no silver bullet", as Fred Brooks said.
1. Security vulnerabilities
2. The Ask.com toolbar
3. Oracle abandoning Java EE
... which is extremely frustrating because...
1. Virtually all of the "security vulnerabilities" deal with the browser plugin for using applets, which hasn't been widely used in 15 years
2. The toolbar malware, while stupid beyond measure, only applies to the consumer Java installer, which nobody installs anymore due to item #1 above.
3. Java EE is legacy tech. While deeply entrenched, most of the work out there for it today consists of maintenance or migration to more service-friendly approaches like Spring or Dropwizard.
Java is certainly not perfect. It's also long in the tooth, and is associated with "the enterprise", and so it's not seen as "sexy" by young developers. But for business software, large-scale data processing, and web/REST backends, I've yet to find anything on the horizon that seriously competes with it.
Every year I get bored and go exploring a new alternative language in side projects. Every year I come back, more appreciative of what I have. Python/Ruby/Node have their beginner-friendly charms, but are limited by the lack of type checking and/or chaotic ecosystems. Golang seems really promising, but has a long way to go. C# seems like the most credible challenger for business systems, but the .NET Core ecosystem is probably still years away from being where Java was in 2005.
I don't mind discussing Java's shortcomings. But I'm tired of hearing about irrelevant shortcomings such as applets and Java EE. Because that's just a way to keep a "language war" going without having to point at a serious alternative.