News for hackers. Stuff that matters.
Re:Rust Sucks If I Fail to Write X by vvanders on Friday February 17, 2017 @01:53PM (#13670696)
How often do you really need those interesting structures(and the memory fragmentation that comes with them)? I've seen countless times where a developer reached for std::hash_map/linked_list when there will never be more than 10 values in their dataset. In that case an array would be at least as fast and much easier on your data layout.

Also if you're trying to implement lockfree data structures then safe/unsafe pointer access are going to be the least of your worries :).

Re:Rust Sucks If I Fail to Write X by charles-salvia on Friday February 17, 2017 @02:09PM (#13670837)
When you need them you really need them. A Patricia Trie for example, which includes back pointers to ancestor nodes, is simply an ideal structure for prefix search.
Re:Rust Sucks If I Fail to Write X by Manishearth on Friday February 17, 2017 @02:41PM (#13671067)
How about a rephrasing: how many times do you really need to write these?

Rust will make it tricky to implement these, but then you can use the datastructure safely as much as you want. It's a "write once use everywhere" thing.

Re:Rust Sucks If I Fail to Write X by jstimpfle on Friday February 17, 2017 @03:41PM (#13671525)
Usually there's no good library that fits your use case. There's always subtle differences (to quote John Carmack)

Or it's really hard to find the good one amongst a hundred bad ones (to paraphrase ESR, when he tried Rust in all seriousness).

"Write once use everywhere" is wishful thinking, it's important to make adaptions (to paraphrase Knuth).

Re:Rust Sucks If I Fail to Write X by fanf2 on Sunday February 19, 2017 @06:40AM (#13679241)
Check out qp tries http://dotat.at/prog/qp for something rather more compact than Patricia tries