For example, this is asp.net core: <https://learn.microsoft.com/en-us/aspnet/core/?view=aspnetco...>. This is the std lib: <https://learn.microsoft.com/en-us/dotnet/api/?view=net-10.0>. This is EF core: <https://learn.microsoft.com/en-us/ef/core/>.
There are many more (optional) technologies coming built-in. Your code will typically depend for 98% on official, trusted and vetted code. It might sound like hyperbole but it's reasonable to state that JVM and .net core have no competition if you select for these aspects.
I know, programming languages and religion... So do whatever you want with this information.
It's not about the sheer number of code you have. It's very easy to just add random stuff and bloat your stdlib, like e.g. Python has done.
You want the right amount of the right libraries that are of high enough quality.
Java is the funniest example you could have given since Guava and Apache Commons, which are alternative implementations of the stdlib exist. Why do they exist? Because the Java stdlib has historically been pathetic in its quality - you still can't parse json, the basic act of opening a file has historically been laughable, etc.
You want at the least the basic building blocks like strings, unicode, collections, datetime, json, web server, http, db handling, regex, crypto, etc. to be good enough to use for 90%+ of projects and/or to provide the right interfaces for 3rd party options to hook into, to maintain compatibility.
Languages that either have incredibly poor implementations of those or don't offer them at all suck, no matter how many xml parsers or telnet libraries they may implement.
- The standard library, which is both trusted/blessed and perma-stable
- A package ecosystem which is neither
I would love to see more exploration of the space in between:
- An extended stdlib which ships versioned libraries which use semver rather than being perma-stable.
- Better support for managing verification and assurance of package ecosystems.
You mean like Guava or Apache Commons for Java or Boost for C++?
Half of the point of an stdlib is that it is a single shared lib so you don't run into the all-too-common problem of having multiple versions of the same lib in your program. Either you bundle all the stdlib multiple times OR you need to rely heavily on complex dead-code-removal which increases startup time (and still have a lot of duplicated binary blob from different versions peer dependencies).
This is why stdlibs almost never _actually_ remove stuff or make breaking changes, because that would make existing programs not compile on the new version of the compiler. This is why in Java you can still call Date methods that resemble the ones present in Javascript (.getYear(), .getMonth(), etc). They were deprecated in JDK1.1 (1997) and still available, today. The alternative is to go through a python3 moment at some point.
Semver the stdlib makes it not that much better than using 3rd party packages.
As someone who doesn't use the mentioned languages often, it's surprising to hear that Python's stdlib is inconsistent given how old it is / how much work has probably gone into it.
If you look at any language that has been around a while, with Java being a great example, you'll see many libraries that use an outdated coding style. Compare the different date/time libraries in Java, for example. Evolving these is always a problem, which I think Unison addresses in a way that lets the language evolve without having to carry too much baggage forward, while still not breaking others' code.
But yes, in languages with batteries included sometimes they feel like an afterthought. It's not just Python. Java also used to have a big standard library, with many useful things including GUI programming which has been neglected a little bit.
Swing was replaced with JavaFX, then JavaFX was removed from JDKs. Long live Swing! But yes, it's extremely nice to have a GUI library out of the box.
With node, what happened is that it was left to the ecosystem to grow good packages/batteries. Same with golang (see the uuid lib example from 1.27 the other day).
To bridge the gap you could have the language/platform declare some “blessed packages” or even “blessed packages and their versions for each release of the language”.
I found Python's stdlib confusing. Is it list.sort() or sorted(list)? str.encode('UTF-8') to bytes and bytes.decode('UTF-8'). The string instance is already encoded in 'UTF-8'.
async for item in fetch_data_stream():
print(item)
Using async when infact you are `await`ing for items from fetch_data_stream() generator.There is another alternative too, releasing interface only packages, then hoping everyone agrees to use those. JavaScript/TypeScript people actually did this already for one very tricky one, validation, see Standard Schema [1], which was great success. But I would hope to see more, for instance interfaces around typical building blocks like job queues, email sending etc.
This is already in nightly[1]. I don't see what "getting money in peoples pockets" has to do with its stabilization.
[1]: https://doc.rust-lang.org/std/random/trait.Rng.html#tymethod...
[1]: https://pythondev.readthedocs.io/platforms.html
[2]: https://doc.rust-lang.org/nightly/rustc/platform-support.htm...
All that matters now is that your LLM can write reliable code and really that choice has already been made by the corpus of examples.