←back to thread

177 points signa11 | 1 comments | | HN request time: 0.001s | source
Show context
mjevans ◴[] No.42160806[source]
This makes me further appreciate how golang's features tend to work entirely at compile time, which is also fast.

One of the other things that makes me worry about Rust is how similar it's depends look to npm projects, where there's a kitchen sink of third party (not the language's included library of code, and not the project's code) libraries pulled in for seemingly small utilities.

replies(4): >>42160836 #>>42160837 #>>42160849 #>>42160939 #
maxbond ◴[] No.42160939[source]
I think it's the natural state of affairs for a "folk standard library" to emerge. I don't think pydantic or serde should be part of their standard libraries. But I will use them in most projects. In ten years, the "folk stdlib" will probably be a different set of packages (perhaps a superset, perhaps not). Don't push the river; if it's natural, manage it rather than fighting it.

Trying to anticipate all or even most use cases in the standard library is a fool's errand (unless we're talking about a DSL, of course). There are too many and they are too dynamic to be captured in the necessarily conservative release process of a language implementation. Languages should focus on being powerful and flexible enough to be adapted to a wide variety of use cases, and let the community of package maintainers handle the implementation. Think of this as a special case of the Unix philosophy; languages should do one thing very well, not a million things unevenly.

I bet most people here don't believe a command economy could ever work in a market for goods and services. Why should it work in a marketplace of ideas?

replies(1): >>42161950 #
riwsky ◴[] No.42161950[source]
And new cars tailored for each consumer’s use case will emerge in ten years, too—that doesn’t make it any less awful to live in areas that lack good public transportation.
replies(1): >>42162062 #
maxbond ◴[] No.42162062{3}[source]
I'm not sure I understand the metaphor? Let me know if I'm off base.

If the suggestion is that putting things in the standard library makes them better, I disagree. My experience with Python for instance is that a "batteries included" strategy results in some phenomenal packages and some borderline abandoned packages that are actively dangerous to use.

To riff on your metaphor, the federal government designs the arterial highways, but the state, country, and city/town officials design the minutia of the traffic system. If the federal government had to approve spending on replacing some street signs or plowing snow, we would have a terribly impoverished transportation system.

replies(1): >>42166259 #
riwsky ◴[] No.42166259{4}[source]
The suggestion is that, while it is possible to overdo a stdlib, it is also possible to underdo it.

For two examples: plenty of languages leave auto-formatting and testing to the community, functionality which rust is better for having standardized.

replies(1): >>42167214 #
1. maxbond ◴[] No.42167214{5}[source]
I agree.