Hacker News new | ask | show | jobs
by vturner 2381 days ago
Sigh, I know new language features are cool, but I highly doubt the growing dominance of Python and JS is a question primarily of language features. Python has a REPL and the outstanding tooling built on that along with an ecosystem of libraries where a default use case is the design choice. That all leads to "fast" development which what a lot of people care about. JS has the default use app deployment area: browser.

Meanwhile Java's REPL is a pretty sad imitation, and I see no movement toward trying to get back in the user app space.

I love the JVM and the language itself is good enough, but the management of Java features through the years leaves me disappointed.

* I know Android is Java and Kotlin focused but Android development is entirely different than writing a JavaSE app. Also know Kotlin compiles to JS, and I think that supports my grumpy young man persona. A hugely successful language IDE company saw it useful to build a cross compiling language on your platform.

4 comments

Java's development is still mostly not in the language (although some developers focus on language changes). Most of the improvements in recent versions were to GCs, low-overhead deep profiling, and general performance -- neither Python nor JS compete well in these areas. In addition, the upcoming JDK 14 has the jpackage tool which would make it easier to deploy desktop applications, and there's a lot of investment reducing warmup time (CDS), AOT compilation that appeals to some microservices and maybe mobile/WASM apps, easy FFI and native memory access that can help with machine learning (Panama) and, yeah, the REPL. What features would you like to see?
It's a different kind of programming. Two different industries basically.

Python and JS were designed for small experiments. I would wager 90% of Python code per capita are single file scripts.

Java is for building whole systems.

The reason Java is losing traction compared to the Python/JS type languages is that the type of programs people write are different. In the 90s, the majority of programming was on big infrastructural things like word processors, control software, web browsers, etc. Now that programming has gotten so much more popular, more people (by plurality) are working on comparatively smaller, more toyish things. It happens that Python/JS is the better tool for this kind of work.

If software is to keep growing at the same pace, the new programmers will be absorbed by the Python/JS camp. Python/JS will keep rising. There is a maximum number of kernel developers or compiler developers in the world, but the amount of small toy apps that can be created is infinite.

What do you really get out of a Java or Python REPL?

If it’s the simple kind like python in bash, it’s really primitive compared to an IDE where you can inspect things. Why doesn’t a simple project suffice?

> What do you really get out of a Java or Python REPL?

For my part, a REPL helps me think about what I'm doing. There's a design process prior to writing code--sketch things out on paper, do a mind map, assemble pieces, get a general architecture. In the thick of coding, though, it's nice to be able to try out an idea or two in real time, test as you go, and feel out how the code is taking shape.

REPLs are really an invaluable tool for thinking about code in real time. For some people that may not be helpful or necessary, but it's expedient for me.

REPL-driven development is quite common in the LISP communities, and one of the main reasons I love Clojure. Stuart Halloway did a talk on this topic: https://vimeo.com/223309989
Right, but will We Assembly be a JS killer?

If I can stay in Python and target the browser without the fuss and bother of JavaScript, why would I?

WASM won't kill JavaScript because there is a whole generation of programmers that actually prefers it to Python etc. and goes out of their way to use it (nodejs).

There are also more technical reasons like WASM not being able to access DOM.

There's already a transpiler to compile python to Javascript. The question is: why would you want the hassle to add that tool to your pipeline and the added complexity of debugging your frontend code?
Nothing prevents you from compiling your Python code to JavaScript blob and run it without really bothering with JavaScript. You don't need wasm for that.
JavaScript and Python can't match performance, scalability, security, rich libraries for developing enterprise applications that comes with Java Ecosystem.
You might not, but JS is popular enough for many developers to continue using it.