News for hackers. Stuff that matters.
Re:Working with strings in Rust (2020) by HarHarVeryFunny on Friday September 23, 2022 @09:26AM (#32951632)
Comparing a modern language (Rust) to an ancient one like C seems like a straw man argument. For Rust to succeed it needs to be better than other current alternatives, so for an article written in 2020 C++-17 would seem a more relevant comparison.

"Rust is safer than C" - meh, so what? So is C++ ...

Re:Working with strings in Rust (2020) by maxbond on Friday September 23, 2022 @09:34AM (#32951737)
This is a straw man of the article though. It's a discussion of string representation and Rust language features - decisions that were motivated by C.

This isn't an article about why you should use Rust, it's about strings in Rust.

Re:Working with strings in Rust (2020) by HarHarVeryFunny on Friday September 23, 2022 @11:46AM (#32953517)
> This isn't an article about why you should use Rust, it's about strings in Rust.

Well, the article literally has more C code in it than Rust, so it sure seems to be about comparing Rust to C.

Why the author thought it would be useful to compare Rust's strings to C, a language that literally doesn't even have a string type is beyond me. Kind of like saying "Look how fast I can run! Even faster than a walrus!"

Re:Working with strings in Rust (2020) by maxbond on Friday September 23, 2022 @02:22PM (#32955392)
Like I explained, it's difficult to understand Rust's language design - especially why it has multiple string types - without understanding C. Really, it's difficult to understand the decisions of most languages, without understanding C.