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

The point is more that it's a bad contract, isn't it?

If a slice is something which can't safely be copied, then why can it be copied?



So that you can pass your slice to functions and actually make use of them.

That somebody could go along and start modifying data structures they aren't supposed to is a problem in Java, C#, ... many languages.




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

Search: