4 ms·
Compile time in Java is way bigger than in JS. What do I need to do in order to compile a simple hello world in java ? In JS i only need the browser and a text
by HugoDaniel 10y ago
Compile time in Java is way bigger than in JS. What do I need to do in order to compile a simple hello world in java ? In JS i only need the browser and a text editor if i'm fancy.
Java is slow on the first run (even if you admit it is just the JVM running your already compiled code). Try running a different java code in every site and you will understand why JS is prefered to it.
Also JS has a foot in functional programming and is much less verbose, it also has evolved to be even leaner. e.g. The current lambda syntax (fat arrows) is a treat
- dawidloubser 10y agoAs a Java engineer, I'm enjoying ES6/7 development much more these days. I wanted to point out, however, that Java 8/9 has excellent support for basic functional programming features, with an equally-nice syntax for lambdas, but with a good type system (via Functional interfaces) to boot. The thing that I get hung up time and again, with ES6/7, is lack of a type system. We write some complex ES6/7 + Immutable JS apps (e.g. in the financial services domain), and haven't managed to extract full value from Flow or TypeScript just yet, due to library constraints etc.
- HugoDaniel 10y agoIndeed, coming from a Haskell background I also have some problems with Flow. I spend more time struggling with it than with reaping the benefits it brings. Perhaps this will change in a near future. I would like to look into the Java functional approach. Is there any reference you recommend ?
- dawidloubser 10y agoJava's type system and FP features are really weak compared to Haskell's :-) But it compares favourably with ES6's, until you start using ImmutableJS, and ES6 currying. Then Java lags far behind... I've always been deeply into it, and using it for years at work, so no good off-hand reference. I'd be picking one as random as any web search that you'd perform, sorry! I should never have learnt Haskell. It messes with your mind [1] whenever you write in any other programming language, yet you can hardly ever use it in practice. Well, certainly here in South Africa. [1] Obligatory link: http://www.xent.com/pipermail/fork/Week-of-Mon-20070219/044101.html http://www.xent.com/pipermail/fork/Week-of-Mon-20070219/0441...
- douche 10y agoRunning babel is consistently slower than running MSBuild or javac in any of my projects. Not to mention all the other linting, uglifying, minifying, bundling and copying bullshit the gulp script is doing.
- HugoDaniel 10y agoThe same could be said about Netbeans or other specific optional parts of Java development. JS devs that target anything after the iphone 5S (2013, almost 4 years ago, before 64bit processors even arrived in android land) don't need to use babel, and arguably http2 takes most of the benefits from minifying and bundling. It is amazing the amount of stuff that JS does if you don't follow the trends blindly and think a bit about your usage and tools.