
Blog Post: The Dark Side of Rust Language - diegopacheco
http://diego-pacheco.blogspot.com/2020/01/the-dark-side-of-rust-language.html
======
sudeepj
> Rust has issues with String. Rust has 6 String types. String, Str, CString,
> Cstr, OsString, Ostr

Absolutely spot on! You add Path, PathBuf & ffi into this mix, it becomes
tiring very soon. I think a quality of life improvement is needed in this
area.

~~~
fiedzia
Its not a Rust problem, any project that mixes using string with passing them
to C FFI and operating system API will need to handle those somehow
differently. In Rust this is expressed with types and necessary
checks/conversions are verified by compiler. In other languages its developer
responsibility to deal with the problem of (sometimes subtle) differences,
there is nothing here to fix really.

~~~
sudeepj
> there is nothing here to fix really

I get the rationale behind the need for different types. When I say quality of
life improvement, I meant standard conversion functions between these types
which would suffice for most of the use cases. Maybe a separate crate for this
would be a good start.

