5 ms·
Ironically, while Java was the original "write once, run anywhere" language, it never succeeded in that regard (e.g. browser applets were never popular). Ironic
by hn_throwaway_99 6y ago
Ironically, while Java was the original "write once, run anywhere" language, it never succeeded in that regard (e.g. browser applets were never popular). Ironically, I believe Javascript has.
I was pretty much exclusively a Java programmer for the first decade and a half of my career, before moving to Node and TypeScript. I don't think I could ever go back at the point. Most importantly, this is my first time where the entire code base (front end and back end) is in the same language and toolchain, and I think it is the single most important thing I've seen in years for improved team productivity. The ease with which engineers can go between front end and backend is an incredible boon that shouldn't be underestimated.
- WalterBright 6y ago> Java was the original "write once, run anywhere" language That crown properly belongs to the UCSD P-System, which was the Java of the 1980's. It was the same idea as Java - compilation to a bytecode which an interpreter ran. It failed because the interpreter performance penalty was too high. Java also started out as an interpreter, which made it too slow. Steve Russell of Symantec invented a JIT for it, and like the lumbering Allison-engined P-51 getting a supercharged Merlin, it brought Java to life.
- hota_mazi 6y agoI don't know about that. I coded in UCSD-P quite a bit (and played a few games written in it, Wizardry on the Apple 2 anyone?). But UCSD-Pascal never reached a tiny fraction of the audience that Turbo Pascal did.
- WalterBright 6y agoTurbo Pascal certainly had more users, but it was never "run anywhere".
- hota_mazi 6y agoNot sure what you mean by that. Are you talking about the host OS and the fact that Turbo Pascal was Windows only, as opposed to Pascal UCSD which was a VM?
- WalterBright 6y agoI meant that the UCSD system ran on many diverse platforms, and TP did not.
- nsxwolf 6y agoI also wonder how much the difficulty of sharing files between different systems due to different disk formats played a role in its failure. You could run p-system on a lot of machines - Apple II, IBM PC, TI-99/4A, PDP11... but how would you (and why would you) distribute your code across machines with such different storage media?
- WalterBright 6y agoOh, people found ways to transfer files. BBSs were one way, the Kermit program another, NNTP newsgroups, etc. I transferred files from my PDP-11 (8" floppies) to my PC (5.25" floppies) using Kermit.
- nsxwolf 6y agoMaybe it was more of a problem of not being able to think of a use case for running a pCode program meant for a 512K PDP11 on a 48K Apple II+. A bit ahead of its time.
- WalterBright 6y agoIt was definitely ahead of its time, but I and others tried to use it. It was just too slow, and you couldn't make competitive products with it.
- coldtea 6y ago>Ironically, while Java was the original "write once, run anywhere" language, it never succeeded in that regard That's what people say, but I don't see that. The same Java code is extremely portable, from Windows, MacOS, Linux, etc, on both the server, cli, and GUI app side. It's just that its UI libs have historically been over-engineered shit like Swing.
- hn_throwaway_99 6y agoI'm not saying Java code isn't very portable, and there are some notable exceptions (the IntelliJ/JetBrains products always are first to come to mind) of successful cross platform Java client apps. But much of the original late 90s hype about Java was its cross platform nature, especially in the browser, but Java applets and other in-browser Java technologies were never popular (consider GMail and other GWT apps were written in Java but compiled down to Javascript). Java owes 90%+ of its ubiquity and longevity to its success on the server.
- spullara 6y agoIronically if Java developers had used the built in DOM APIs instead of the Applet canvas crap, we probably would have had great SPAs a lot earlier.
- therealx 6y agoTrue, and if gui libraries stuck with common widgets that were cross platform, we would already have a long term native cross platform GUI toolkit.
- chii 6y ago> DOM APIs instead of the Applet canvas crap i wonder if it was because at the time, the different DOM api in each browser was so immature, that to unify it into a single api is too big a task. The applet+blackbox region for rendering is the easiest MVP. Of course, with hindsight, that turned out to be a piece of crap.
- manyxcxi 6y agoThough it’s technically _not_ Java, Kotlin has been a breath of fresh air for us in the last year. We tried it on a few smaller projects and it took off like wildfire throughout our team. I write a lot of JavaScript (typescript included) and I have found it to be a very nice combination of things I like from both Java/JavaScript. Admittedly I have been primarily writing Java for the last 15 years and consider JavaScript a second language for me, you may find Kotlin gives you a good reason to come back to the JVM (where it makes sense to of course).
- bassman9000 6y agoIs there any major player or project doing backends in JS?
- deepsun 6y agoAs far as I know, all major players care about performance and scalability, which JS cannot afford on a single-threaded runtimes.
- bryik 6y agoUber: https://eng.uber.com/uber-tech-stack-part-two/ https://eng.uber.com/uber-tech-stack-part-two/
- bassman9000 6y agoThere's a lot of Java in that article: Hive, Hadoop, Spark, Elasticsearch, Kafka, Cassandra...
- throwaway189262 6y agoI use typescript a lot. It's way better than JS but the type erasure problem is far worse than Java. Essentially all types are erased, so bugs where typings don't match what you expect and everything blows up are common. This isn't possible in Java because it's statically typed at runtime. JS also uses several times more memory, is slower, and has a terrible (non existing) threading model. Yes you can run multiple instance of node or whatever, but sharing objects between them requires message passing which is orders of magnitude slower. Until JS has a good threading model I'm never using it for backend. It's too expensive to use a bunch of single core machines to make up for it. All of our devs use Typescript and Java daily for front and backend, the only overhead is making sure objects were passing around match on both ends. The only advantage to using the same language for everything is hiring inexperienced devs that don't know both IMO
- ht85 6y ago> bugs where typings don't match what you expect and everything blows up are common > the only overhead is making sure objects were passing around match on both ends Seem like is it a big deal based on the first sentence. I've never been convinced of the single language argument. Sharing code between frontend and backend sounds good but as in practice there's little overlap... models have subtle differences, there's extra logic server side... All in all it's not very practical. To me the most awesome part of a fully TS project is that you can use the same interfaces everywhere. If you take the time to define them for any input / output, everything is pretty much guaranteed to be sound. > the type erasure problem is far worse than Java Check out RunTypes [1], amazing to guard any incoming data. 1. https://github.com/pelotom/runtypes https://github.com/pelotom/runtypes
- throwaway189262 6y agoThis library looks great! For cross language comms you can also use gRPC to avoid writing objects for both sides. We're not using it company wide but so far it works as advertised, minus the annoyance of having to use gRPC proxy to web endpoints
- salamanderman 6y ago
- ralphc 6y agoIt succeeded. Early 2000's I converted my company's "document server" from _heavily_ ifdef'd C to Java. It ran on Windows, Linux, AIX, Solaris, HP-UX, and Linux on IBM mainframes. Having EBCDIC as the default encoding for strings really made you pay attention to encoding in and out of Unicode.
- pjmlp 6y agoHow come? I do it daily during most of those 25 years, developing on Windows, deploying across multiple flavours of UNIX.
- hota_mazi 6y ago> Ironically, while Java was the original "write once, run anywhere" language, it never succeeded in that regard (e.g. browser applets were never popular). Ironically, I believe Javascript has. It completely succeeded in that! Java (well JVM) developers today can - Write code on any of Windows/Linux/macOS - Deploy that code on any of Windows/Linux/macOS Not a lot of language/platforms can claim to this amount of success, let alone with such an amazing set of tools and ecosystem.
- tasogare 6y agoC# (largely inspired by Java) run on even more platforms, because there is compiler/runtimes for mobile platform. It’s also the second biggest "entreprise" language, which fix a lot of Java pain points.
- hota_mazi 6y agoTechnically, maybe. In practice, how many developers write C# on a non Windows platform? I'd say a very, very tiny minority. On the other hand, Java is being written on all platforms and being deployed on many as well.
- nfg 6y ago> In practice, how many developers write C# on a non Windows platform? I'd say a very, very tiny minority. Plenty do - think of deploying c# web services on Linux servers / containers.
- throwaway8941 6y agoGP said "write", not "deploy". I write C# on Linux and I am basically the only person I know who does that.
- jussij 6y agoMicrosoft is pushing hard with it's .Net Core offerings and that effort is designed to make C# a more universal language. Whether that effort pays off, only time will tell.
- mavelikara 6y ago"Write Once,Run Anywhere" (WORA) is not the same thing as using the same language on the frontend and backend. Java has quite good success with WORA as explained by hota_mazi in the sibling comment. Aplets failing to catch on does not take anything from WORA success story of Java.
- shock 6y ago> The ease with which engineers can go between front end and backend is an incredible boon that shouldn't be underestimated. In my experience, the engineers that can do that and still produce solid code are very, very rare.