News for hackers. Stuff that matters.
Re:Why Rust strings seem hard by brundolf on Wednesday April 14, 2021 @06:57PM (#26814144)
The only thing I claimed about the two as a category was that "strings are not immutable, they're data structures" (which applies to Rust too). I purposely didn't go into much more detail than that because it wasn't really the point of the article. I did mention that C works with strings as raw char arrays, and C++ has a struct around a char array that manages length-tracking and reallocation automatically.

I believe these two statements are accurate, though I'm happy to be corrected if they aren't. It's been a few years since I wrote C++. Beyond that, I see my claims as "abstract" and not "falsehoods".

Re:Why Rust strings seem hard by ncmncm on Wednesday April 14, 2021 @07:05PM (#26814215)
A false abstraction is no less false.

I don't know when you went to school, but most places still teach using C++98, which is two generations removed from current practice. It is not unusual for TAs assigned to teach C++ to resent being taken away from their glorious combinators, and teach their resentment.

If coding C++ was not immense fun, you may be certain you were Doing It Wrong.

Re:Why Rust strings seem hard by anand-bala on Thursday April 15, 2021 @12:18PM (#26822442)
I am not sure what you mean by "false abstractions" in this article. Could you cite some concrete examples in the article that support your claim?

The author isn't claiming to go into a deep dive into C or C++. They are trying to talk about Rust. Your argument seems to be against the author's use of "C/C++" vs. "C and/or C++", which seems to me like some nitpicking, as the author uses "C/C++/Rust" later on. It isn't like they are pooling the languages as being the "same". Rather, they are talking about having similar, lower-level of control over "strings" as a data structure, as opposed to the primitives they seem to be in other high-level languages like C#, Python, Java, Go, Kotlin, Swift, or JavaScript.

Re:Why Rust strings seem hard by v8dev123 on Thursday April 15, 2021 @09:50AM (#26820480)
You're correct. I don't know why people downvote you. A lot of C++ comments are grayed out. Does HN has an agenda or what?