Hacker News new | ask | show | jobs
by marwatk 1375 days ago
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.
1 comments

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.