Rust and the limits of swarm design
esr.ibiblio.org
esr.ibiblio.org
I love Python but this statement is absolutely coming from someone who does not write Python on a regular basis. Many stdlib modules are greatly outclassed by third-party alternatives - urllib2 vs requests, datetime vs arrow just to name a few - to the point where no one actually uses the stdlib modules in production.
But this article raises an other question : if you want 10 years long stability, is it wise to rely on third party code? If you plan on maintaining your own project that long, it's probably acceptable to take time to write your own implementation and maintain it. Or you could even use a third party dependency, then progressively replace it with your own API compatible implementation.
This is a real problem. Here's a blog idea: "Consumer Reports for libraries"
(As an aside, the phrase "objectively terrifying" bugs the hell out of me. Terror is fundamentally subjective - it's a primal emotion. Please let's not let "objectively" become the new "literally".)
This is still a problem, however, but it's one the community has been aware of for a while. https://github.com/rust-lang/rfcs/pull/1824 is step 1 in fixing it.
I understand there's a recognition of the problem, and I think it's great that it's on the radar.
This is not an ideal situation to be in, but it is better than he makes it out to be. And of course, we're already working on fixing it.
It's not so easy to just "choose the right package". Often all the packages for a given function are someone's hobby.
Consequently JavaScript code needs constant, expensive maintenance. Whereas Python code can rely more on the standard library and big frameworks and tends to keep working for years.
Programming language designers should see themselves as builders and curators of great standard libraries, the language itself is almost incidental to that goal.
Python is actually a good example of this. Look at the library ecosystem built up around scientific computing. None of that is in the standard library, yet there is a common set of packages being used.
C++ takes the approach mentioned of having a rich standard library (Boost) that is a separate project from the core language. It (IMO) does not work very well. Many C++ programmers don't use Boost and generic C++ libraries are unable to use Boost as a dependency.
That is because a boost installation litters your hard drive with several hundred thousand tiny files. I can't in good conscience require end-users to install that monster to compile my 10Kloc project.
As a result many libraries are close to de facto standards because any Java dev can easily get those libraries, regardless of being on Win, Mac, random Linux distributions, etc.
Node.js is popular, but it's not 'standard'. It's not part of any ECMAScript standard libraries, which would be the requirement if it was to be standard.
I don't know the situation with Go that well, so if it has a http library in the standard I'll take your word for it, but there do seem to be some popular non-standard http servers like Caddy.
As for Python, this is probably an example of where the impact of standards is not that great. How often is the standard http server used compared to popular third party alternatives? Are there any web apps you know of that are using the standard http server in production?
In terms of value proposition, I think the author is just hankering for some .NET style support agreements in order to hedge his maintenance cost bets - and I'm sure there are or will be plenty of consultancies willing to provide this service, so long as the demand exists. That open source language users are entitled enough to expect this service for free from language maintainers... I'm not sure that's completely justifiable.
I don't see the standard library and third-party packages as being in opposition. Far from it. A rich standard library encourages a rich ecosystem of third-party packages.
Maintenance costs affect the authors of open source packages even more than they affect commercial users. They are working for free and in their spare time. A rich standard library makes a language attractive to people who want to write packages.
I don't think you even need to just pick one crate for a particular functionality - narrowing the field down from 23 to a handful with well-understood strengths and drawbacks would be a good start.
For instance basically nothing comes in the standard library for C. If basically nothing is offered in the standard library of Rust then why switch? It's valid point.
If we want a lot of adoption to Rust, people need to have an easy way to find quality implementations in crates or add them to the standard library so they are easy to find. Either way, you need one of those two things to happen because people are lazy.
Languages are a lot more than the standard library.
Perl users brags about the numbers of packages in CPAN. For me, that's a nightmare. There are a dozen packages for everything. Each time I pick up one (more or less at random after wondering for hours which one I should pick between all those, which are irregularly accurately described), I discover a few weeks later that there are bugs in this package, or that it is deprecated, or that it has been reimplemented for better performance with a slightly different name, or that the procedural access to the features disappeared in next version, or that the package Y version 0.12.3 is more stable than the package X version 2.1 that I chose, or that oh in fact this package function is TODO so I have to switch to another package because it's been marked TODO for 13 years, or that I have to ditch the package I use when my program grows because it does have the extra features I now need and I should have picked up another one from the start, etc.
So I try as much as possible to stay away from packages which are not in Core. The problem now is that even those 'standard' modules are in fact not so standard for Perl distributions which may omit some of them...
And then you have to fight between the packages provided by your OS/Perl distribution and the ones provided by CPAN...
I sometimes end up rewriting everything in C, where there is one standard library, and then de facto standard/widespread libraries with not many alternatives, so it's hard to pick a wrong one.
-------
Same problems for CTAN (Latex). Plenty of packages but most of them are incompatible with some others. In the end you may not be able to use them if you happen to need the 'wrong' combination of features.
That doesn't sit well with me, at least. I'd want the top ML developers looking at TensorFlow, and the best language implementers doing the same for cpython, not the latter trying desperately to improve code they have no expertise in. From that perspective, what matters is community: is there a knowledgable community supporting codebase 'x', where x could be the stdlib or some third party library. Some other commenters in this thread proposed better library curation/discovery tools in place of a formal commitment of long term support by the core team, which seems ideal! Using such an approach, you rely on the language for the core-language bits, and on third parties for the third-party bits, which seems on the surface to be healthier than arbitrarily choosing the only constant group (core language devs) as your supporters of everything.
Actually, I think the community does recognize that this is a problem they are running into as they scale up. Previously there was the discussion of the Rust Platform [1] as a pseudo-stdlib which was received with a lot of mixed since the Python approach isn't actually all rainbows and sunshine. More recently, there has been effort to try to improve the discoverability of relevant crates [2].
At some point "design by everyone" turns into "design by committee" by another name. This criticism of Rust has manifested itself in other ways, too. For example the amount of "unsafe" used in various crates (the idea being that "the community" will collectively minimize "bad" use of "unsafe"). In my view there's a tendency for some of Rust's advocates to simply assert that it will work itself out without presenting good reason to believe so.
Can you be any more pompous?
Rust has curation in its crate system. It's all in really good crowd sourcing numbers. Crates.io, number of downloads, with trends (i.e. Even if it was popular, is it still?). Then GitHub has great ones: stargazers == community interest level; watchers == # of people interested in tracking the project, possibly b/c it's a critical dependency; forks == # of people who've reviewed the code; contributors == overall success in the community; commit graphs = how much work has and is going into the project; issues can help you understand if there are any critical underlying problems with the maintenance.
When I'm evaluating a library I look at all of these numbers to understand how comfortable I am in pulling a dependency on the library. IMO this is far better than the curation of some system level tools, which just become defaults, and don't always offer users the ability to evaluate different options easily, cron stands out in my mind as one that there are better options than the default.
Anyway, his loss... the Rust community is awesome, in my humble opinion.
One might easily argue that folks who criticize C and C++ for its ecosystem are also "attacking" it, by your reasoning. It detracts from the rest of your comment in my opinion (which isn't humble at all).
And "the Rust community" is not a monolithic entity. For example, I find "the Rust community" in aggregate here on HN, other than a relatively small few, to be rather caustic, aggressively defensive against criticisms of Rust, and a bit too handy with downvotes for disagreement of legitimate arguments against some of Rust's features, syntax, grammar, etc.
He does have some good ideas in there about how to possibly to make crates.io help you more easily identify the best crate for your usecase, but I think the solution to that is a fairly detailed algorithm weighing the some list of values like I put above. Otherwise you end up never allowing new options to blossom.
Trying to read how what I put before wasn't humble, and perhaps your right on that point as well. The perseption of humbleness is definitely subjective, and the added color I threw in there probably in fact did remove any humility from the overall statement, which of course are my own personal views and I highly encourage people to question and criticize them.