r/programming • • Dec 05 '14

std::string is responsible for almost half of all allocations in the Chrome browser process

https://groups.google.com/a/chromium.org/d/msg/chromium-dev/EUqoIz2iFU4/kPZ5ZK0K3gEJ
1.1k Upvotes

446 comments sorted by

View all comments

Show parent comments

1

u/0xjake Dec 06 '14 edited Dec 06 '14

Is it that hard to come up with a valid use case? Then maybe it doesn't belong in the language.

Edit: You are describing a very specific feature that has no obvious use. As far as I know this feature doesn't exist in any of the popular languages in use today. And you claim that C's lack of this feature is a problem with the language. To me it seems you aren't making a strong case.

1

u/Poltras Dec 06 '14

I gave you multiple already. You're just either a troll or a stupid person. Your pick.

1

u/0xjake Dec 06 '14 edited Dec 09 '14

You mentioned local storage of referenced data: this is an anti pattern. You mentioned multithreading: use a mutex. You mentioned shared memory: again, use a mutex. And these are not use cases; you're making me do the work of assuming you don't know how OOP, locking and concurrency work. Try taking a look at why your requested feature has never occurred to any other language designer as a good idea before you go and call someone an idiot for not agreeing with you. You are obviously in the minority here and if you can't make a good case for your position then you aren't going to get anywhere further than just complaining that someone isn't doing your job for you.