Hacker News new | ask | show | jobs
by tslater2006 1666 days ago
How was the experience for you? I've done the past few years in C#, but am considering using 2021 to learn Rust.
3 comments

You can definitely get some incredibly elegant and fast solutions using Rust. Check out timvisee's AoC 2020 [0]. It honestly had a significant impact on my personal style.

[0]: https://github.com/timvisee/advent-of-code-2020

Thanks for linking! I plan to do something like this again this year :)
A++++ loved it. I wrote a pair of blog posts about it.

https://www.forrestthewoods.com/blog/learning-rust-via-adven... https://www.forrestthewoods.com/blog/solving-advent-of-code-...

To be clear, I don’t compete for the leaderboard or code golf. But I do try to write elegant code that’s performant.

AoC is a great way to learn a new language. I try to solve the puzzles entirely on my own. Then I check the Reddit solutions thread and Ctrl-F my language. It’s a great way to learn new tricks, libraries, or just idiomatic language style.

And using Rust for AoC turned me into a certified fan. Rust iterators are really great compared to C++. They’re like C# linq but better. The itertools crate is super helpful.

I usually do it in Rust. I have a lot of fun with it, it's great practice.