A focused explanation of expression statements in Go, clarifying why certain built-in functions like len, cap, append, and make cannot be used as standalone statements. Using the Go spec as a reference, it explains that these functions must be part of a larger expression because their return values cannot simply be discarded, unlike regular function or method calls.

2m read timeFrom boldlygo.tech
Post cover image
1 Impression