top | item 44650890

(no title)

typical182 | 7 months ago

> The biggest problem is any string you pass as an argument to the fmt functions is moved onto the heap

FWIW, that's not quite correct. For example, a string literal passed as a fmt argument won't be moved to the heap.

The upcoming Go 1.25 release has some related improvements that help strings in more cases. See for example https://go.dev/cl/649079.

discuss

order

fsmv|7 months ago

Yeah I just saw in the bug they're finally making progress on fixing this, exciting! I edited in the link if you didn't see.