
I frequently encountered the notion that strings are immutable in languages like Java, Python, and JavaScript. I always thought the concept was clear until I compared it with Go's string handling. Here, I’ll share the differences I discovered.
I frequently encountered the notion that strings are immutable in languages like Java, Python, and JavaScript. I always thought the concept was clear until I compared it with Go's string handling. Here, I’ll share the differences I discovered.
Think of it like giving someone a copy of your house key - they get a copy (pass by value), but they can still use it to change what's inside the house (the underlying data).
Golang concepts battle