3 ms·
Disadvantage #1 isn't really a disadvantage in modern computing, it's the right thing to do.
by sparkie 13y ago
Disadvantage #1 isn't really a disadvantage in modern computing, it's the right thing to do.
- aidenn0 13y agoI strongly disagree. It is a tradeoff between that and advantages #1 and #3; with the bstring library, for example, you pass in a mutable string and the function mutates it. In no world is passing in a mutable value, having it mutate it, but then having to reassigning your variable superior. Passing in an immutable value, and then assigning a fresh value is reasonable, but that's not what SDS is doing, AFAICT. I think gcc has some decorations you can have to tell it to never ignore the return function. I'm curious why s = sdscat(s,"Some more data"); didin't end up like: sdscat(&s,"Some more data");