News for hackers. Stuff that matters.
Re:Dashmap: Fast concurrent HashMap for Rust by unlinked_dll on Friday March 27, 2020 @04:07AM (#22701128)
I'll critique the language. Unsafe is a bad name. It doesn't mean "not safe" it means "cannot be verified by the compiler to be memory safe." Some things are inherently unsafe by that definition, including things necessary for software development. It may be better than other names, but frankly - it's too scary.

In particular, the implementation of data structures. Raw memory allocation, usage of pointers, low level concurrency primitives - none of that can be done without the programmer manually enforcing invariants.

But unsafe isn't wanton abandon. You still have to obey the type system and ownership rules.

As for the goal, it depends on the author. Some prioritize one over the other. In general the Rust community these days tries to optimize the balance of safety and speed with as few compromises as possible - which is fundamentally why the language exists.

Re:Dashmap: Fast concurrent HashMap for Rust by rat9988 on Friday March 27, 2020 @04:31AM (#22701224)
unsafe doesn't mean dangerous or hazardous. If we cannot verify safety then it's unsafe. The word's choice seems correct to me. I agree with the rest of your comment though.
Re:Dashmap: Fast concurrent HashMap for Rust by atoav on Friday March 27, 2020 @01:26PM (#22704843)
Another name that came to my mind was trustme as you as the programmer have to uphold certain garantuees that outside an unsafe block the compiler would enforce.
Re:Dashmap: Fast concurrent HashMap for Rust by steveklabnik on Friday March 27, 2020 @02:12PM (#22705244)
Re:Dashmap: Fast concurrent HashMap for Rust by asdf-asdf-asdf on Friday March 27, 2020 @05:54AM (#22701526)
sorry, what does "to optimize the balance of safety and speed with as few compromises as possible" mean? it's possible to cover many-many situations with that description.