---
title: "Comment by Sagar Jha on \"Common anti-patterns in Go\" | Hashnode"
description: "Saif, the blog was really a pleasure to read and very informative. Would want to share feedback on two points. For point 5: The function printAndReturnFoofoo wh"
url: "https://hashnode.com/posts/common-anti-patterns-in-go/605ad82747b0d2243d4ab7ba/comment/6060d3945aa4944ee40fa543"
---

[Discussion](https://hashnode.com/posts/common-anti-patterns-in-go/605ad82747b0d2243d4ab7ba)

Comment [Common anti-patterns in Go](https://hashnode.com/posts/common-anti-patterns-in-go/605ad82747b0d2243d4ab7ba)

[Sagar Jha](https://hashnode.com/@SagarJ)

[Mar 28, 2021](https://hashnode.com/posts/common-anti-patterns-in-go/605ad82747b0d2243d4ab7ba/comment/6060d3945aa4944ee40fa543)

Saif, the blog was really a pleasure to read and very informative. Would want to share feedback on two points.

For point 5: The function `printAndReturnFoofoo` where we have a named return type, we would get error if we try to initialize variable with same name inside the function, it is already initialized for the return, so we can update `foofoo := "foofoo"` to `foofoo = "foofoo"`

For point 9: The example is missing the simplified version.

[Saif Sadiq](https://hashnode.com/@saif309)

[Mar 31, 2021](https://hashnode.com/posts/common-anti-patterns-in-go/605ad82747b0d2243d4ab7ba/comment/6060d3945aa4944ee40fa543#reply-6064169d669be10bf6055677)

Hey [Sagar Jha](https://hashnode.com/@SagarJ),

Its great to hear that you found the post helpful. Thanks for the suggestion regarding the point 5. Have made the changes by removing the short variable declaration.

Regarding point 9, I think it does have a simplified solution. Here is an example to help you understand its simplified solution in a better way :

```
// add sums up x and y
func add(x int, y int) int {
    return x + y
}
func main() {
    complexFn := func(x int, y int) int { return add(x, y) }
    fmt.Println("sum:", complexFn(1,2))
    simpleFn := add
    fmt.Println("sum:", simpleFn(1,2))
}
```

Do let me know if you have any queries/thoughts. Thanks.
