The String vs. &str split is definitely annoying, but a necessary drawback of Rust’s ownership mechanics (which bring many benefits compared to C in other places).
The others have their specific use-cases (like file paths or C interop). It’s certainly not like you constantly juggle 8 different kinds of strings.
Not necessarily a bad thing. If your method of invocation gives context about its possible use cases. You can make the program more safe because you know it’s being used appropriately. If you’re just passing a pointer around anything could happen to it. So it’s hard to help the programmer not make mistakes
In Rust, and I don’t know
Isn’t it a bad thing?
The
String
vs.&str
split is definitely annoying, but a necessary drawback of Rust’s ownership mechanics (which bring many benefits compared to C in other places).The others have their specific use-cases (like file paths or C interop). It’s certainly not like you constantly juggle 8 different kinds of strings.
I don’t know, I don’t use Rust
Not necessarily a bad thing. If your method of invocation gives context about its possible use cases. You can make the program more safe because you know it’s being used appropriately. If you’re just passing a pointer around anything could happen to it. So it’s hard to help the programmer not make mistakes