Re:Go Developer Survey 2022 Q2 Results
by marwatk on Thursday September 08, 2022 @02:42PM
(#32770098)
In things like rest APIs you need them quite a bit to distinguish between a value being the zero value and not present at all. Most libraries I've seen have an IntPointer or similar function exposed globally.
[ Parent
| on HN ]
Re:Go Developer Survey 2022 Q2 Results
by bilinguliar on Thursday September 08, 2022 @02:54PM
(#32770289)
This is true. In the case of REST, it is your “encoding/json” who will allocate for int pointer. So I do not see why new() is needed.