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

The language doesn't really have a preference for either. When you see it being done mostly with pointers that's usually the author's preference. Also, using a pointer for a receiver is more convenient than pass by value since you can always derive the value by dereferencing a pointer, but you cannot derive the original pointer after a value has been passed by value (since the address has changed during the copy operation).


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

Search: