Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That pointer example is a little weird. A C/C++ pointer used that way wouldn't print "Leto" "Paul", either. All it would do is update the local variable to point to a new object, but the caller would still be pointing to the original. I think the poster meant to use a pointer to a pointer here (which would work as intended in both Go and C/C++).


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: