Live data from Hacker News

Better Batteries

matklad.github.io

21–26 of 26 posts

Re: Better Batteries

#21

Currently we generally have a trade-off between: - 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.

> - An extended stdlib which ships versioned libraries which use semver rather than being perma-stable.

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.

Re: Better Batteries

#22

`Included batteries` and type safety are not the only but imho surely the most important criteria for software projects (I am excluding throw-away code and scripts). The article raises an important point but fails to teach the reader about the JVM ecosystem and the .net core ecosystem. The standard libraries of these two zoo's of programming languages vastly eclipse what the discussed languages offer (Go, Python and…

foot note for people not in the know- theres(in chronological order): 1) .Net Framework 2) .Net Core 3) .Net. Basically everything mentioned these days is just .Net, but core is often added because microsoft used such an ambiguous name.

Re: Better Batteries

#23
post #14

Currently we generally have a trade-off between: - 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.

> An extended stdlib which ships versioned libraries which use semver rather than being perma-stable. You mean like Guava or Apache Commons for Java or Boost for C++?

Pretty sure Deno's stdlib is like this too

Re: Better Batteries

#24

`Included batteries` and type safety are not the only but imho surely the most important criteria for software projects (I am excluding throw-away code and scripts). The article raises an important point but fails to teach the reader about the JVM ecosystem and the .net core ecosystem. The standard libraries of these two zoo's of programming languages vastly eclipse what the discussed languages offer (Go, Python and…

You miss the point by a mile.

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.

Re: Better Batteries

#25

Are we really going to keep talking about code in the post-coding era like nothing ever happened? 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.

Go away

Re: Better Batteries

#26
post #8

I was fully expecting a comparison of recent battery chemistries, and forgot the "batteries included" saying being used for programming. 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.

It's about backwards compatibility and that the naming conventions weren't stabilized until after a bunch of libs entered the language.

Even when the logging library was introduced, surely someone must have said this is too Java-y.
Post reply on HN