Skip to content

Commit

Permalink
2024-07-29/02: add a quote from Rob Pike
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Jul 29, 2024
1 parent d974ae2 commit c1fc1ed
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions 2024-07-29/02-go-a-reasonable-good-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ func GreaterOrEqual[T cmp.Ordered](t *testing.T, actual, expected T) {

Just one of those things that I end up re-writing in every project. Yes, I know
about [testify](https://github.com/stretchr/testify) and other assertion
libraries, but nowadays I believe if you can avoid importing a library, as long
the code you write is trivial, it is better to duplicate the code than try to
import a dependency.
libraries, but quoting [Rob
Pike](https://www.youtube.com/watch?v=PAAkCSZUG1c&t=568s) here, "a little
copying is better than a little dependency". As long the code you write is
trivial, it is better to duplicate the code than try to import a dependency.

About another piece of code that generics allows me to write and I always end
up re-writing in every project is the `must*` family of functions:
Expand Down

0 comments on commit c1fc1ed

Please sign in to comment.