go article quote update

This commit is contained in:
Wouter Groeneveld 2021-04-15 12:00:22 +02:00
parent fa13e5dc10
commit edff86e524
1 changed files with 6 additions and 1 deletions

View File

@ -205,7 +205,12 @@ Now, the bad parts. Go is not a functional language, but easily lends itself to
})
```
Is impossible without calling in external packages with unclear APIs and incomplete documentation. Furthermore, I wanted to chain two string replace methods together, which is simply `"bla".replace(...).replace(...)` in any language - except Python perhaps. And Go. In Go, many utility functions reside in packages instead of as methods on the string type, resulting in something awkward as:
Is impossible without calling in external packages with unclear APIs and incomplete documentation. As Fumitoshi Ukai said in his [When in Go, do as Gophers do](https://talks.golang.org/2014/readability.slide#1) talk:
> Don't write Go code as you write code in C++/Java/Python.
Write Go code as Gophers write code.
So I complied simply wrote a for loop. Next, I wanted to chain two string replace methods together, which is simply `"bla".replace(...).replace(...)` in any language - except Python perhaps. And Go. In Go, many utility functions reside in packages instead of as methods on the string type, resulting in something awkward as:
```go
str := "yeah"