this post was submitted on 08 Jan 2022
22 points (100.0% liked)

Programmer Humor

32063 readers
1015 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] gary_host_laptop@lemmy.ml 0 points 2 years ago (2 children)
[–] jet@hackertalks.com 2 points 1 year ago

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

[–] Ephera@lemmy.ml 1 points 2 years ago

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.