4 ms·
I was doing adventofcode this year using (and learning) Rust and had to write a doubly linked list. Impossible is obviously an exaggeration but I admit it is pa
by teacpde 8y ago
I was doing adventofcode this year using (and learning) Rust and had to write a doubly linked list. Impossible is obviously an exaggeration but I admit it is painful to wrap my head around it at the beginning. I had to google a reference implementation and understanding why it needs to be done that way is also not straightforward. It is definitely not the best thing to try out Rust with, but to me it is the best to force myself to really think hard and grasp the idea of ownership. Once I figured it out the complex becomes reasonable and I started to appreciate the safety aspect of Rust.
I also did the same puzzle with Go, it was such a breeze, it is as easy as to implement a doubly linked list in python/ruby/$yourfavoritescriptlanguage. But I start to dig Rust as it makes me think more and it feels like an eye opening experience.