News for hackers. Stuff that matters.
Re:Stop Using Linked Lists by millstone on Wednesday May 22, 2013 @03:37PM (#5753223)
> String (i.e. [Char]) is inefficient unless you're doing a lot of manipulation such as insertions and deletions in the middle of the string

Is String actually efficient for this use case? If you insert in the middle of a String, wouldn't it have to copy all of the preceding characters? Only the tail could be shared, I would think.

Re:Stop Using Linked Lists by thirsteh on Wednesday May 22, 2013 @04:06PM (#5753359)
Yeah, it's not very efficient. I mainly use lists as stacks, or when I'm filtering some collection and I just need to traverse it.