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

Ok, I think I just understood the problem. The following would cause a problem:

   s0 := append([]string{}, "zoo")
   sa := append(s0, "foo")
   sb := append(s0, "bar") // overwrites sa[1]
Go is truly unique in this sense, and you could not actually treat go slices as immutable structures. Point taken.


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

Search: