4 ms·
Java's "runtime needs" are a lot simpler than Python's - it's very easy to create a jar that works on any JVM back to 8 (which everyone has) or even earlier - a
by lmm 4y ago
Java's "runtime needs" are a lot simpler than Python's - it's very easy to create a jar that works on any JVM back to 8 (which everyone has) or even earlier - although the language is unpleasantly verbose for ad-hoc scripting. (I work in Scala most of the time and write command line utilities in it too; the JVM startup is tedious but not worth the overhead of switching to a different language). Ruby also used to be a popular option in the sysadmin space; it's pretty similar to Python but hasn't shot itself in the foot quite as vigorously on the dependency management front.
Something like Swift might be a good option in the "OCaml featureset + boring syntax + low startup overhead" space, which is what we're really looking for.
- noisy_boy 4y agoI like scala a lot but it I think it gives too many options to people that can be abused to show "cleverness" which is the last thing you want in a utility program. I stick to Scala basics and it is wonderfully concise compared to Java. Ah yes Swift is another excellent choice. I didnt like it much originally (few years ago) but based on an HN comment recently, went back to do the introductory tutorial. It has come a long way and is very pleasant to use. If I had to guess, its close association with Apple might bring "iOS"/"mac"-only connotations that might make folks not consider it. Don't know how I forgot about it.
- schemescape 4y agoSlight tangent: what’s the easiest Java runtime to setup? Is there a single binary JRE that’s fully open source? Edit: and not from Oracle? This is just an idle question I’ve had, not related in any way to Python.
- TJSomething 4y agoGenerally, I'd use Eclipse Temurin from Adoptium, if I not already in a Linux distro that has a JRE package.