Hacker News new | past | comments | ask | show | jobs | submit login

Ouch. I guess this would be a reason to use strings more, since they're immutable.



Someone using a string when they really want a byte array/slice would fail review on its face. Excepting external APIs forcing "strings" on us, we only use the Go string type for UTF-8 code unit sequences (and this is a common assumption in the Go world).


Using string doesn't allow reuse, so you are leaving significant performance on the table.




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

Search: