Hacker News new | past | comments | ask | show | jobs | submit login

> You can't write cli applications in a JVM language because the start-up time is too slow. Which means you can't compose scripts that call Java apps.

You're right. In the case of small, fast applications designed to be called as part of shell scripts, the JVM does suffer start-up costs. Some testing on my personal machine shows the JVM to be 2x to 8x slower than a comparable Ruby or Python script in startup time. [1] Depending on the script, that startup time may or may not acceptable, and if the script runs for longer than a second, which is entirely possible for anything that goes beyond the local machine, the JVM will get progressively faster.

> This is not just 1 type of application, it's the most important type of application by far.

This needs more explanation. I've used Unix for many years, and I've definitely bought in to its philosophy of small and composable; It's a philosophy that in many ways mirrors functional programming. However, in my opinion, the most important type of application varies considerably by person. For you, the small, single-purpose applications may be what you use most.

And I agree, if you're programming for the Unix platform, the JVM would not be the best choice. Unix was built on C. A program that builds on that platform is probably a better choice.

But there are many more applications out there, and for any command-line program that operate in a time domain longer than 10 seconds, the JVM startup costs are mostly eliminated. This time-domain is very plausible for a command that operates on medium-scale databases or anything with network connectivity.

It's silly to completely dismiss an entire platform because it is not the absolute best choice for a single domain of programs.

I'm curious: What do you do where the short-lived, composable Unix functions are the most important programs?

[1] https://gist.github.com/bostwick/8ee1d4df9c7743f9efed




I think we simply approach software different. I feel that small, composable applications should be the default, and I nearly always start off this way. I've been involved in projects from writing a specialized version of cp, ETL processes, to developer focused but consumer-facing web applications and the first interface I write to anything I do is as a small cli application that works well with standard unix tools.

When you embrace this philosophy it doesn't particularly matter how good a language's ecosystem is, you have all of unix to interop with. For example, I don't care if a language has a good JSON parsing because jq[1] exists and is probably faster and easier to work with than just about any language's built in tools, even better than JavaScript itself.

With JVM you can't participate in writing software this way. Everything must revolve around the JVM and it's ecosystem.

[1]http://stedolan.github.io/jq/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: