Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
marwatk
· 4y ago · 0 comments
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.
Comments
[–]
bilinguliar
4y ago
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.