Re:Gotchas, Irritants and Warts in Go Web Development
by eurleif on Thursday March 07, 2013 @08:37PM
(#5341638)
As far as I know, it can only create a pointer of type A that actually points to a value of type B, not reference unallocated/deallocated memory. Nullable<T> could do that too if the language allowed it.
Re:Gotchas, Irritants and Warts in Go Web Development
by lagom on Thursday March 07, 2013 @10:19PM
(#5341906)
It's definitely possible to access unallocated memory e.g.,
// p points to address 1000
p := (*int)(unsafe.Pointer(uintptr(1000)))
Of course, this is why use of the unsafe package is heavily discouraged.
http://golang.org/pkg/unsafe/