7 ms·
Ask HN: Would Java make it if introduced today?
Given the meteoric rise of Java, I started using it in 1995; would Java the language and platform enjoy repeat success if it had instead been introduced today?
- giaour 11y agoNot if it were introduced with the original bytecode interpreter. The first few iterations of the Java Virtual Machine were horrifically slow, but it got better. So if the Java language and VM were released today in their current state, complete with lambdas, streams, annotations, and HotSpot, then yeah, I think it would take off.
- pete23 11y agoAs is yes, as was would sink without trace.
- seanp2k2 11y ago...but the stack trace would still be visible from outer space.
- diego 11y agoIt's not really about the technology, it's about the hook. I also started using Java when it came out, and there were two main hooks for us C/C++ coders: - write once, run anywhere. - write programs that run on web browsers (applets). Today, it could be: "I want to write an Android app, and Google just released this new Java language/platform that I have to use." In other words, any new language can make it if a large corporation creates a compelling reason for large numbers of programmers to use it.
- alttab 11y agoSo, unlike swift.
- deleted 11y ago[deleted]
- talles 11y agoI don't know about make it, but Microsoft Stack (C#/VB/.NET) would have a stronger dominance nowadays considering that it would grow without Java on it's back.
- swalsh 11y agoIgnoring of course that much of C# owes its existence to Java (and C++).
- Orangeair 11y agoHonestly, as it currently stands, Java appears to me as merely a pared down version of C#. C# shares nearly all of the same major features, while adding in more useful ones like properties and Linq, plus the promise of many new features on the horizon, like the null propagating operator. All of those, plus the rest of Microsoft's development ecosystem, make it a much nicer language overall. The only reason I don't think C# has taken over Java yet is because of how entrenched Java is, and it's wide cross-platform support. With mono, Silverlight, and Microsoft's newfound love for open-sourcing however, I think those arguments would be pretty much null if Java were to be introduced today.
- imron 11y ago> The only reason I don't think C# has taken over Java yet is because of how entrenched Java is A far bigger factor is that C# is (or at least was) Windows only.
- carlosdp 11y agoWasn't C# developed after Microsoft failed to buy Java from Sun?
- lnanek2 11y agoWorse, they took Java, put Windows only stuff in it, and Sun sued them...
- saosebastiao 11y agoNot at all. Java's rise was the perfect storm of several factors: object orientation taken to its logical conclusion during a huge IT hype period for it (much like "Big Data" today), the tail end of a huge explosion of CPU architectures which made VMs very attractive, and CPU power finally getting to the point where pervasive garbage collection wasn't a detriment to large systems. The platform as we have today is simultaneously weak in terms of its stagnant and outpaced feature set, and strong in terms of its optimization capability and ecosystem size. But its strengths were a function of its popularity: lots of people wrote Java so there was plenty of incentive to invest in the platform/ecosystem. The only way I could see it taking off today as a new language is if there were a company willing to dump 10x the resources into it that Oracle or Sun ever have.
- vezzy-fnord 11y agoobject orientation taken to its logical conclusion Oh, how I wish. OO was never taken to its logical conclusion in the mainstream at all. Java's Nygaard-style OO was just a sugar coating on top of a generic procedural paradigm and a far cry from Smalltalk's example that was set over 20 years prior. Ironically, much of the JVM's early optimizations were born out of research into the Self VM - a prototype-based OO Smalltalk environment. Yet thanks to C++ and Java's object models following the Simula legacy becoming so firmly entrenched into the mainstream as the OO, today the entire paradigm has become disgraced and is outright reviled in some circles (how many times have I seen FP enthusiasts jump every time it's mentioned...) The Smalltalk and Self communities are minuscule. A more recent addition was the Io language, but that too is very small. OO died before it could really shine, though the Smalltalkers' legacy did somewhat live on as they went on to establish many of the software development methodologies and maxims that are taken for granted today.
- seanmcdirmid 11y agoOO's death has been exaggerated. Take a language like Scala, which has really powerful OOP constructs in the form of mixin-style traits (at least on the static side of object innovation). Not to mention many of the strongtalk people are now working Dart. Objects will rise again (if you think they've fallen, that is).
- theonemind 11y agoNot sure how that can be answered. How would it compete against C#, which is basically Java++, and now open source and cross platform, and mature? But C# doesn't exist without Java, which it was heavily influenced by. Scala runs on the JVM. Does Scala exist if Java is "introduced now"? Scala is also a Java++. I mean, Java was such a major influence that you have to stipulate how we deal with the fact that Java couldn't compete now because it would be essentially competing against future, evolved version of itself.
- jackmaney 11y agoAgreed. If Java hadn't existed until now, it's entirely unclear what languages would be popular or even exist. Hell, would object oriented programming be popular, or would it be a niche paradigm?
- seanmcdirmid 11y agoOOP gained momentum in the late 80s and early 90s. Before we were programming in Java, many of us were using...C++. OOP might have been different, but it would probably still be dominant.
- zurn 11y agoJava did a lot to strengthen the C++ style static dispatch branch of OO. The Smalltalk/Python/Objective-C school of OOP might have fared a lot better of there was no type safe language in the opposing camp.
- seanmcdirmid 11y agoThe dynamic branch of OOP actually fared pretty well in Python, javascript, ruby, even in the presence of Java. As to why the others faltered (objective C being popular just because of Apple, smalltalk always being niche), I can't really say.
- ahoge 11y agoI don't think any of the languages which were introduced 20-25 years ago would make it. All modern languages and all current iterations of the older languages are vastly superior by every imaginable metric. All those 1.0s from the past would look like someone's toy project, because, well, that's what they were.
- hyperpallium 11y agoJava was a success because performance + ease of use compared with the languages then available, on the hardware available. Today, python, ruby etc are fast enough for many tasks. Java was a hit in the enterprise because it had static typing, modules etc and was a complete product (tooling, doc - and stewardship from a big and respected tech company, who was neutral). OO helped, fashion-wise. C# and objective-C are the most similar languages today - but notwithstanding MS very recent moves, both are wedded to a proprietary company. But if Java was introduced today, it would have a difficult fight against Go: Go is similar, and with Google's neutral backing, would have taken Java's role. Or maybe languages which Java displaced: delphi, ada, etc. The realistic answer is: if java hadn't existed, something that met those needs would have been drawn forth by the demand.
- exabrial 11y agoAbsolutely. The only thing really keeping Java from taking over the world is a slightly outdated standard lib. It's a great combination of speed, portability, community, OO, native types, functional prototypes and some clear lines drawn so you can't shoot yourself in the foot too terribly bad. Oracle's API architects are concerned with selling as much WebLogic licenses as possible however, so don't expect changes soon. However, the community has come up with some absolutely brilliant libraries where Oracle has clung to legacy technology. All in all, it's a superb language with a bright future. Maybe we'll get better leadership as Oracle is forced out of the closed source era (it's happening at Microsoft, so don't laugh).
- sukilot 11y agoWell and Java evolution stalled for 5 years during the Sun to Oracle transition, while the rest of the world passed it by. Java 8 should have launched by 2010.
- ares2012 11y agoInstead of answering the question, I'd like to point out how different the world of programming might look today WITHOUT Java. Java was the first maintstream GC language (no more malloc), fully object oriented and the first byte code based VM language. Prior to Java, you were either writing in interpreted languages like Perl or in C/C++. Java brought programming to a higher standard with clear syntax, easy of use and a much faster learning curve than languages up to that point. That paradigm gave rise to new languages like Javascript and new designs for large scale software. So, I think it's irrelevant if Java would make it if introduced today since I am not sure today would be here (or at least in its current form) without Java.
- greggman 11y agoThere were plenty of other languages with GC. Perl for example. Not sure what "full object oriented" means but I think smalltalk might count? Also plenty of byte code languages. In fact VB was a bytecode language. I also don't believe Java had any influence on JavaScript except for using the name for marketing
- sukilot 11y agoThe only connection between Java and JavaScript is that JavaScript stole Java's name as a marketing ploy for Netscape scripting. (I would call JS a competitor to Java applets, but it wasn't even that. It was a complementary technology.) And "mainstream" only referred to marketing budget. Perl and Python and Tcl had already launched (Perl and Tcl quite popular for the era.) Java's main novelty was the relatively strong cross-platform story due to the VM and GUI bindings.
- dmak 11y agoTo further that point, JavaScript is more similar to Scheme if anything.
- rhinoceraptor 11y agoEven more ridiculous is that JavaScript and Java are the same age.
- wrayjustin 11y agoMaybe. Java does one thing really well - marketing. Primarily to schools. It's hard to compete with a language that every graduate knows, and worse, it's the only one they "know."
- PuercoPop 11y agoIf they invest as much in marketing as they did, yes. Just look at the success of mongodb.
- sukilot 11y agoJava was the original Web Scale.
- thomasfoster96 11y agoWell, for one, the notion that it was 'write once run anywhere' wouldn't convince too many people - after all, everyone's already got a language called LiveScript in their browsers and that's turned out to be good enough for 90% of use cases.
- wsxcde 11y agoWhat are the other assumptions in this hypothetical scenario? Does C# exist? Does Scala exist? Does F# exist? You could argue that none of these would exist if Java didn't. What might we have instead? C/C++ of course, Python/Perl/Ruby and friends too. QBASIC is older than Java and Visual Basic was just a cleaned up QBASIC, so we'd have that. Borland's Pascal-derivative Delphi was a decent language; maybe that would've done better without Java. Would Haskell and the MLs have done better? Perhaps, because at the time it came around Java was quite a productive language. Or maybe I should say, it was a nice language before everybody and their uncle discovered the design patterns book and started implementing AbstractFactoryInterpreterEventLists willy-nilly. Without Java, I think it's plausible that the design pattern craze - a lot of which is just attempting to shoehorn functional programming into an OO language - would never have happened. And people might've discovered actual functional programming earlier and the state of the art might've been closer to F# than C#. So back to the original question, in this scenario, Java wouldn't make it, because honestly, although Java is a decent language but F# and friends are way better.
- Jach 11y agoI think it's possible, if this hypothetical Java had strong corporate backing. I'm not sure Oracle could do it, but if it came out of Google, I bet it would catch on. The language Go has shown you can release a language no one really needs (sorry enthusiasts, just my opinion) that will still be successful.
- joe_developer 11y agoIf Java was released today, it would still be valuable. Java is a small, well defined language (without many surprises). Java runs on an open source platform, OpenJDK. The JSR's are incredibly well designed -- Web programming (Servlet, JSP, JSF), Message Driven Beans, JMS, JPA, and JAXB. If you look at benchmarks of web applications/frameworks, Java-based ones are blazing fast.
- chamakits 11y agoI don't know, but Java definitely succeeded at least in part because of the programming environment at the time. I didn't live through the time that Java saw it's rise in use on the enterprise, but what I've been told by others that was a big deal at the time were two things combined that made it attractive, and it being one of the few languages that was very accessible that had these two characteristics. These were: * Garbage Collected language. * Being able to write code in Windows (which is what most enterprise developers used then and even now), and deploy on Linux/other OS reliably. Again, this is just what I've heard from others that were there, so feel free to correct me if I'm wrong. Today, there are other options, so maybe it wouldn't be as big a sellilng point. But to me at least, it is still one of the languages that allows this the easiest by far.
- estava 11y agoThe way that the Java platform evolved very slowly just seems rather unlikely nowadays. Sun didn't allow for Java extensions that made it too platform dependent. To this day Java's platform independence is perhaps its greatest legacy, since platforms have changed a lot and the Java code can still be used even for the latest hardware. But the idea of a proprietary platform is just exotic nowadays. I doubt it that when they started the Java project that they imagined it that most of it would be free and Free. Everyone wants software to be a commodity. I don't know how they would fund a similar project knowing that it would compete against very much free and Free solid alternatives. Also, browser plugins are dead. So something like Java applets would hardly take foot. Like others have said, one of the big selling points for Java was Windows development. The interfaces sucked. But the need was there. Once Microsoft came up with .NET that profitable market was challenged. A lot of Java alternatives nowadays can go a long way from just hosting web services on Linux. So Java's selling point of supporting many different platforms would not have been as interesting. Also, Apple restricts JIT on iOS, further compromising alternative platforms on that platform so even if a new Java wanted to support iOS it would have to settle for less. Settling for less was in fact one of Java's goals. It helped it with platform independence. But it didn't make many platform dependent developers too happy either. :-)