The problems with "batteries" included is one, you can never include everything - people are always coming up with new things - new batteries if you will. Two, you then add significant bloat to programs for all the 'batteries' they don't use.
I think you've misunderstood my point, and I can only apologise that I didn't express it well enough.
I was not advocating for everything to be in the standard library. I was advocating for good, broad standard libraries as that increases the utility of the programming language/platform, and decreases the amount of work that the individual developer has to do.
Naturally not everything can be in the standard library.
But if the standard library is broad, then that leaves more time for other work - whether that be developiong your own libraries, or doing due diligence and checks on other people's.
Java struggled with this - historically you need a full, hundreds of megabytes JRE even for the simplest of programs to run - although, more recently, they are making Java more modular - so you can download the core JVM and then add which modules you actually want to use.
Storage is cheap.
I remember not liking .NET Framework 1.x because the FTP program that required it was a 600Kb download, but the framework was ~80Mb. In those early days of low bandwidth and smaller storage, .NET felt very much like a bloated version of the Visual Basic runtime DLLs.
But it was at least shared across programs, and once installed it was available to all of them. I slowly came around to the idea - I just wished Microsoft had done a better job with distribution.
These days you can use a Raspberry Pi as a desktop. In this context the issue of storage or RAM is only a huge problem with microcontrollers. Where Node.js, Python, Java and .NET are probably not necessarily your first choice precisely because microcontrollers are so constrained.
Then the other problem is, sometimes the implementations included in a language leave something to be desired. For example, Java has long included implementations of XML parsers for various APIs, but some of the early Java parser implementations built into Java weren't very fast/optimized, so you started getting other implementations competing with the Java XML implementations. Also, then people created new APIs - new approaches to how to interact with XML data (e.g. early on you had SAX or DOM, then people wanted easier ways to work with XML than SAX, but that didn't required the entire document to be parsed into memory at once like DOM does, so they created STAX and Trax, new schema languages for validation (originally we had DTDs, then XSDs, then Schematron and Relax NG (not sure the order those arrived)), etc.
Just as not everything needs to be in the standard library, not every standard library entry needs to be the fastest/leanest/smartest. A good standard library module should be robust, easy to use, and standards compliant (where that matters).
if you need more than the standard library provides, go grab it. Not a problem. But to use your example - at least everyone that wants to parse XML knows one standard way to do it. If you need higher performance or some other feature, you can make the choice to use a different module - but you're also choosing to take on the maintenance for that in terms of security vetting and updates. You're also acknowledging that any new hires/newcomers to your project will need to learn that other module.
Having a broad standard library makes all options better, because you can focus on the parts you care about - and not have to worry about the security, maintenance and provenance of the parts that are less important but still necessary.
And XML is an example where a lot of apps have no need for XML functionality at all. So, why bloat up the runtime with XML functionality that's not being used by your app?
A good runtime won't load them into RAM, they're just there on the disk. Not taking up a huge amount of space in modern terms. And you now have the option. Maybe you're not parsing XML now, but in a future version you want to be able to import an competitor's configuration file or data file? You can at least prototype and possibly even ship that without needing to add anything else. And certainly without adding more work due to new items on your SBOM.
It's really impossible for any language to be all things to all people.
Absolutely. But a good broad standard library benefits almost all people anyway, even if they're not using 100% of it.
Better to have a clean core, and to add to it good libraries that implement what you need.
Here is the point on which we truly disagree. I think you're underestimating the effort in selecting, maintaining and checking those additional libraries. If more of them were from a standard library, you can assume that the vendor or project behind the language/platform is maintaining them and keeping them secure. It's quite literally not your problem.
Whereas with a smaller standard library, everything you import is your problem. And it's a problem that a lot of developers - as well as sysadmins, companies and other organisations - are very badly set up to deal with.
If that weren't the case, we wouldn't be seeing attacks like this. Good luck slipping something like this into the .NET Framework or Java Standard Libraries - I'm not saying it's impossible, but it'll be a lot of work.
And when it comes to exploits, I'd rather that the attackers have to do the work than me.
