News for hackers. Stuff that matters.
Re:Ryan Dahl addresses comments on his recent rant by barrkel on Sunday October 02, 2011 @12:11PM (#3063162)
I think your example is irrelevant - to the general case, which is where a string type is useful. If you need to avoid copies that badly in a specific case, don't use std::string or anything like it.

For example, I know of one compiler architecture which scanned strings from the source, all the while calculating a hash, and basically interned the string (turning it into an index per unique string) without ever actually copying it. Thereafter, the program used the index (an integer) to represent the string, making for fast lookups and comparisons.

Re:Ryan Dahl addresses comments on his recent rant by apaprocki on Sunday October 02, 2011 @12:23PM (#3063198)
I guess I just take issue with saying the "general case" usage of strings does not have to avoid copies. That is how we generally wind up with slow, bloated software.
Re:Ryan Dahl addresses comments on his recent rant by barrkel on Sunday October 02, 2011 @01:00PM (#3063316)
I don't think most software is particularly slow or bloated. It's been quite some time since I thought to myself, "gee, this software could do with being a lot faster", outside of games and video transcoders (and perhaps iTunes on Windows). On the other hand, a lot of software has buffer overflow vulnerabilities; I see a lot of crashes when input data is fuzzed or corrupted slightly.
Re:Ryan Dahl addresses comments on his recent rant by lurker19 on Monday October 03, 2011 @06:44AM (#3065761)
Fast enough is a very recent development. Until 2005 and dual core, computers were not fast enough, especially computers running objective-C.