sometimes wish rust had reference-counted copy-on-write strings like qt
-
sometimes wish rust had reference-counted copy-on-write strings like qt
"you could implement that yourself" yeah i guess but the friction's a bit high
-
sometimes wish rust had reference-counted copy-on-write strings like qt
"you could implement that yourself" yeah i guess but the friction's a bit high
-
sometimes wish rust had reference-counted copy-on-write strings like qt
"you could implement that yourself" yeah i guess but the friction's a bit high
@mcc implement deref str and you get a lot of api surface for free
-
@whitequark That's an optionā¦
I guess part of the problem is that in Qt, all the *consumers* of my strings can accept QString, whereas I am uncertain the various things I feed strings to will be able to accept it without cloning. We got used to String and copy.
-
@whitequark That's an optionā¦
I guess part of the problem is that in Qt, all the *consumers* of my strings can accept QString, whereas I am uncertain the various things I feed strings to will be able to accept it without cloning. We got used to String and copy.
@mcc everything that accepts
&strshould be able to consume a&Rc<String>I think... you might need to throw in an.as_ref() -
@mcc everything that accepts
&strshould be able to consume a&Rc<String>I think... you might need to throw in an.as_ref()@whitequark @mcc That's a double indirection though, could be better.
-
undefined oblomov@sociale.network shared this topic on