John Hartquist
johnhartquist.com
John Hartquist
@johnhartquist.com
rust // python // machine learning // audio
In today's #adventofcode solution using #rustlang, I used a "let-else" statement to
- conditionally declare a variable
- return early
- avoid indenting the remaining checks (as in the other examples)

I prefer returning early and using the implicit return for the "happy path". What do you think?
December 4, 2024 at 11:24 PM