News for hackers. Stuff that matters.
Re:Understand Go pointers by echlebek on Wednesday April 26, 2017 @11:54AM (#14204085)
They're not the same. Go doesn't have pointer arithmetic, and Go functions can safely return pointers to values that aren't created via new().

https://play.golang.org/p/m3OdaXH98_

Re:Understand Go pointers by pjmlp on Wednesday April 26, 2017 @12:00PM (#14204162)
Yes it has, via unsafe package.

Which ANSI C example should I write for you in Go?

Re:Understand Go pointers by echlebek on Wednesday April 26, 2017 @09:39PM (#14208549)
Package unsafe is in the spec, but converting unsafe.Pointer to uintptr (which is how I'm supposing you'd do your pointer arithmetic) is implementation-defined.

This means I could create a perfectly legal implementation of Go where such things result in complete nonsense. I don't think package unsafe "counts".

Re:Understand Go pointers by pjmlp on Thursday April 27, 2017 @02:24AM (#14209589)
If package unsafe doesn't "count", anything that C compilers allow beyond what ANSI C specifies don't count as C, thus many of its system programming features just vanish.
Re:Understand Go pointers by echlebek on Thursday April 27, 2017 @10:34AM (#14211740)
I don't see how that relates to Go pointers.