Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
aidenn0
· 1y ago · 0 comments
Was:
s = sdscat(s,"Some more data");
Chosen over
stscat(&s, "Some more data");
For performance reasons, or something else?
Comments
[–]
rwbt
1y ago
I think it makes it obvious that the string 's' will be mutated.
[–]
aidenn0
OP
1y ago
The ampersand implies that a value will be written to to me (though it's slightly more complicated because many ABIs are inefficient with structs passed-by-value so it's occasionally used for efficiency there as well).