←back to thread

361 points mmphosis | 1 comments | | HN request time: 0.001s | source
Show context
vander_elst ◴[] No.42165926[source]
> It's better to have some wonky parameterization than it is to have multiple implementations of nearly the same thing. Improving the parameters will be easier than to consolidate four different implementations if this situation comes up again.

From https://go-proverbs.github.io/: A little copying is better than a little dependency.

Curious to see how the community is divided on this, I think I'm more leaning towards the single implementation side.

replies(4): >>42165963 #>>42166107 #>>42166264 #>>42169200 #
1. abound ◴[] No.42166107[source]
Like most things, blanket advice will break down in some cases, things can be highly contextual.

Generally, my anecdotal experience is that Go libraries have far fewer average dependencies than the equivalent Rust or JavaScript libraries, and it may be due in part to this (the comprehensive standard library also definitely helps).

I definitely tend to copy small snippets between my projects and rely sparingly on dependencies unless they're a core part of the application (database adapter, heavy or security-sensitive specifications like OIDC, etc)