3 ms·
Go and Node's problem is the dependency hell. Caddy, a simple HTTP 2 webserver, pulled N packages to build. There are Node packages depending on trivial things
by petre 10y ago
Go and Node's problem is the dependency hell. Caddy, a simple HTTP 2 webserver, pulled N packages to build. There are Node packages depending on trivial things (remember left-pad?). Too much modularity and relying on others' work sucks. Go's problem is solved by static linking, and Node's by installing all the required libraries in the node_modules directory.
- justinsaccount 10y ago> Go and Node's problem is the dependency hell. Just these two languages? No other languages or systems have problems with dependencies? > Caddy, a simple HTTP 2 webserver Caddy is simple to use, but is not a "simple" server. This is a simple server: package main import "net/http" func main() { panic(http.ListenAndServe(":8080", http.FileServer(http.Dir("./")))) } > Too much modularity and relying on others' work sucks One of the things caddy implements is automatic ssl support by depending on a library that implements the acme protocol. This type of thing is not exactly simple or something you really want to be writing from scratch if you don't have to. The problem with node is that there is no such thing as a javascript standard library and javascript tooling is not great at dead code elimination. This results in many trivial libraries that each contain a single function. Once the tooling gets better at dead code elimination there should be fewer larger libraries.