Re:When Zig is safer and faster than Rust
by adamrezich on Tuesday March 07, 2023 @01:58PM
(#35059556)
why should writing a basic data structure be an edge case? …what?
[ Parent
| on HN ]
Re:When Zig is safer and faster than Rust
by TheCoreh on Tuesday March 07, 2023 @02:08PM
(#35059705)
All of the "basic" data structures are already provided by either the standard library or crate ecosystem, so you'll rarely (if ever) need to write your own linked list or hash map from scratch.
I say "basic" in quotes because once you factor in the concurrency, ownership and memory safety concerns that are optional in other languages, but mandatory in Rust, there really isn't a simple implementation of these structures that is provably correct anymore.
Re:When Zig is safer and faster than Rust
by yakubin on Wednesday March 08, 2023 @02:32AM
(#35066269)
Rust is supposed to be a systems programming language. If writing basic data structures was an edge case in it, the language would be broken. Luckily, in my experience it isn’t (at least not in this way).
Re:When Zig is safer and faster than Rust
by adamrezich on Wednesday March 08, 2023 @10:53AM
(#35070536)
I'm glad you posted this, I was confused as to whether "basic data structure" meant something different to Rustfolk than it did to the rest of us.