My personal preference for such tools is Rust but it's admittedly a harder sell.
Comment above is mostly addressing the server software use case with larger teams and 100KLOC+ (either one or many programs).
I don't think anyone was using Java much in the CLI niche. It was dominated mostly by Python and Ruby (and Perl before that) before Go came along. I do think Go represents an improvement on that status quo.
Kubernetes, Docker, Terraform and their respective ecosystems really aren't what one would call a smaller codebase.
Go offers a nice balance between performance and platform agnosticism, features like parallelism without it being too complex to write. Manual memory management would have been a useless obstacle wasting developer time for little real gain. Fighting the language to have parallel execution, easy crosscompile, etc. why?
As for HCL, I'm on the opinion that a DSL is better. It's even in the name, Infra as Code, not with code. You want your infrastructure declarations to be easily readable and supportable. Anyone who has used Terraform can read any HCL; your Python code doing the same could be terrible and unreadable by anyone not already on your team. Too much flexibility for something as critical can end badly, imho.
In any case, there's cdktf now, you can mix and match terraform with cdktf.
Disclaimer: I work at Hashicorp, opinions my own and have stayed the same since before joining
> Go offers a nice balance between performance and platform agnosticism
I don't disagree with this. It's too bad the language itself has major problems (which I won't get into here).
> I'm on the opinion that a DSL is better
The two aren't mutually exclusive. What I want is a DSL embedded in a full programming language, like chef's dsl in ruby.
> You want your infrastructure declarations to be easily readable and supportable.
Absolutely.
> Anyone who has used Terraform can read any HCL; your Python code doing the same could be terrible and unreadable by anyone not already on your team
It's possible to write terrible and unreadable HCL too. I know because I've written some.
> In any case, there's cdktf now, you can mix and match terraform with cdktf.
Unfortunately, I haven't had a chance to look too deeply into it yet, although I definitely want to.
I've seen some atrocious Ruby for Chef, so I'm not sure I'd agree here. The advantage of a DSL is that it limits how far you can go. In the case of HCL pre-v2, it had some limitations around dynamism, but now that's out of the way IMHO it strikes a decent balance.
You can write hardcore HCL, but IMHO it's still way easier to parse by a human that bad Python or JavaScript.
As for CDKTF, I'd recommend you do. You can mix and match like having a project with CDKTF in e.g. Python or Go use regular TF HCL modules, but also vice versa, defining a module in TypeScript and consuming it from regular Terraform. So you can have the extra flexibility ( with all of it's advantages and risks) on a per module basis, not all or nothing.
As far as I know, it's not hard to ship a JVM runner with the installer of your program, so this should be a non-issue.
You can trivially ship a self-contained JVM that is completely isolated within a single directory.
It's still around, there is a lot of existing J2EE codebases but it's successor - Quarkus has done away with the vast majority of the config mess. I can't speak to how well it manages that transition though as I was never a big J2EE guy.
The other old offender, Spring, developed a new convention over configuration distribution called Spring Boot which requires minimal configuration and has pretty much displaced the old way of doing things entirely. It's been around for years as the default option at this point.
The way I see Java is that it moves slowly but tends to happily assimilate the best ideas from other languages, runtimes and frameworks and over time sheds it's warts (Java 8 era sun.internal.*, old Date/Time APIs, etc).
Not everyone seems to have an up to date opinion of Java because the last time they touched it was J2EE days or worse yet in university.
A lot of things about Go work out well in practice when there's a human watching it that can just slaughter the process if it starts going off the rails, and the trivial distribution and excellent startup performance make it almost perfect for CLIs. Small code works fairly well, and the sometimes-quite-yolo stdlib gets you to "works on my machine" for 99% of your needs quickly and that's often good enough for ad-hoc tooling (and when it isn't: just delete that non-UTF-8-named file, sheesh).
For large stuff? No please. The type system is far too weak, and the runtime has too many sharp corners. About the only thing I like about it for this is that runtime reflection is very tightly restricted, which prevents some of the worst insanity you see in Java.