News for hackers. Stuff that matters.
Re:Efficient string copying and concatenation in C by mehrdadn on Thursday September 12, 2019 @12:41PM (#20953524)
Sounds an awful lot like C should just become C++ already...
Re:Efficient string copying and concatenation in C by antirez on Thursday September 12, 2019 @12:42PM (#20953538)
No need, C dynamic string libraries totally look like plain C.
Re:Efficient string copying and concatenation in C by doboyy on Friday September 13, 2019 @10:21PM (#20968522)
No doubt, but they are all non standard which is irritating for people who expect that out of the box.
Re:Efficient string copying and concatenation in C by doboyy on Friday September 13, 2019 @10:14PM (#20968496)
This is bait but whatever. Keeping some properties of C is very hard if you go this route. It also seems you'll end up playing lanaguage design whack-a-mole problems which manifests its self in C++ and co.
Re:Efficient string copying and concatenation in C by astrobe_ on Thursday September 12, 2019 @01:46PM (#20954236)
What they really want is to find a way to convince their boss to rewrite everything in Go.
Re:Efficient string copying and concatenation in C by flohofwoe on Thursday September 12, 2019 @12:54PM (#20953668)
std::string has its own share of problems, but at least it's useful for C programmers as a warning on how not to implement a string library (for instance: a string shouldn't be important enough to give it its own allocation, it shouldn't be mutable by default, there should be string manipulation functions which are actually useful in real world situations instead of being an academic exercise, and so on...).
Re:Efficient string copying and concatenation in C by saagarjha on Thursday September 12, 2019 @01:22PM (#20953985)
I’m not sure I understand your first and third complaints and the second one is why const exists.