5 ms·
You wouldn't write a web frontend in Java (not anymore), you wouldn't write your Tensorflow code in Java, nor your kernel module or device driver. You still us
by cle 5y ago
You wouldn't write a web frontend in Java (not anymore), you wouldn't write your Tensorflow code in Java, nor your kernel module or device driver.
You still use the right tool for the job. Java is not always that. Also "right" should factor in your existing expertise, team culture, organizational roadmaps, etc.
- MaxBarraclough 5y ago> You wouldn't write a web frontend in Java (not anymore) Bit of a nitpick, but: GWT enables this, transpiling to JavaScript. Rumours of its death have been somewhat exaggerated (it's maintained but it's not getting that much attention). I'm not sure if Vaadin still makes use of GWT.
- cle 5y agoYeah that's what I was referring to by "not anymore".
- MaxBarraclough 5y agoGot it, I thought you were referring to the demise of Java applets.
- mrkeen 5y agoI bought into GWT back in 2010 maybe. I was sold on the idea of just using one language, and I was wrong. I really regret not diving into proper html+css+js sooner.
- mtmmtm 5y agoThere is now J2CL which translates java into javascript (superfast). gmail and google sheets is written in GWT.
- kaba0 5y agoThan I would rather use TeaVM with some wrappers.
- ivan_gammel 5y ago> You wouldn't write a web frontend in Java (not anymore) I’m pretty sure it’s temporary. There are plenty of projects working in that direction, e.g. https://github.com/i-net-software/JWebAssembly https://github.com/i-net-software/JWebAssembly > you wouldn't write your Tensorflow code in Java Why? Kernel modules and device drivers are probably the only example where you need to pick another tool.
- cle 5y agoYou can write TF in Java. Most don't, for a good reason. Python is the first class citizen, everyone uses it, you can find help most easily for it, its data science ecosystem dwarves Java's, you'll have a hard time convincing scientists to port their Python notebooks into Java, etc. As for web frontends, we've also already had GWT. In most cases you're better off going with the grain and using JS/TS, for obvious reasons. I can continue for a while with examples where Java is inappropriate. Another one would be system daemons that need to use minimal memory. There is Graal but it has so many caveats that I can't really take it seriously yet (and I've tried, multiple times). In this same vein, serverless applications are generally more painless with languages whose ecosystems emphasize fast startup, which Java historically has been terrible at. And on top of that you'll pay for the memory the JVM hogs.
- rakoo 5y ago> You wouldn't write a web frontend in Java (not anymore) I really want to try out htmx (https://htmx.org/docs/#introduction https://htmx.org/docs/#introduction) for my next project because I feel it's the only logical next step to HTML, so yes, I could definitely write it in Java
- lmm 5y ago> You wouldn't write a web frontend in Java (not anymore), you wouldn't write your Tensorflow code in Java, nor your kernel module or device driver. I absolutely would (well, I'd use Scala myself, but I'd absolutely use a single language for all of those). I think the article makes a good case for it.
- twic 5y agoPerhaps implicit in the advice to use a single language is the assumption that the set of things you will have to write with it is bounded. If you are a web development shop, you will not be writing Tensorflow or device drivers. You don't need to worry about picking a language which can do those. You are quite write that you shouldn't write a web frontend in Java, though. For web development, in practice, anyone picking a language which is not JS/TS will have to use two languages. That's still better than more than two!