3 ms·
I took part for the first time this year, as an exercise in learning Rust (I have got up to day 20 so far). It's been pretty good for moving from "I sort of kno
by pm215 8y ago
I took part for the first time this year, as an exercise in learning Rust (I have got up to day 20 so far). It's been pretty good for moving from "I sort of know this language" to being a bit more comfortable with it just by spending more time writing code, and I liked the way the problems get gradually more complicated and tricky. Plus, since each day is a fresh problem you can try different coding approaches without being constrained by having to rewrite a pile of existing code.
There are some aspects where things are easier if your language has good support for features which AoC leans on. Notably, almost every problem requires parsing an input text file, so good regex support is really useful. I found myself wishing for a serde regex backend so I could initialize into structs from a regex match without a lot of tedious Point { x: cap[1].parse().unwrap(), y: cap[2].parse().unwrap(), ... } boilerplate. And since a lot of problems use 2D grids of ascii characters, Rust's lack of native 2D arrays and insistence that strings are utf8 and thus not trivially indexable makes things a bit more awkward than they might have been in a different language. I definitely agree with you that a language with a wide ranging standard library helps a lot to make life easier, too.