3 ms·
> I'm interested in knowing whether there's something intrinsic to Go that encourages such a culture. I think it's because the final deliverable of Go projects
by Ajedi32 1y ago
> I'm interested in knowing whether there's something intrinsic to Go that encourages such a culture.
I think it's because the final deliverable of Go projects is usually a single self-contained binary executable with no dependencies, whereas with Node the final deliverable is usually an NPM package which pulls its dependencies automatically.
- yunohn 1y ago> usually an NPM package which pulls its dependencies automatically Built applications do not pull dependencies at runtime, just like with golang. If you want to use a library/source, you pull in all the deps, again just like golang.
- Ajedi32 1y agoNot at runtime no, but at install time yes. In contrast, with Go programs I often see "install time" being just `curl $url > /usr/local/bin/my_application` which is basically never the case with Node (for obvious reasons).
- int_19h 1y agoWith Node the final deliverable is an app that comes packaged with all its dependencies, and often bundled into a single .js file, which is conceptually the same as a single binary produced by Go.
- Ajedi32 1y agoCan you give an example? While theoretically possible I almost never see that in Node projects. It's not even very practical because even if you do cram everything into a single .js file you still need an external dependency on the Node runtime.
- int_19h 1y agoExamples would be most Node server web apps. It is standard practice to run a bundler for prod deployments.