Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/msrd0/aoc22

My solution to the Advent of Code 2022
https://github.com/msrd0/aoc22

advent-of-code advent-of-code-2022 adventofcode adventofcode2022

Last synced: 4 days ago
JSON representation

My solution to the Advent of Code 2022

Awesome Lists containing this project

README

        

# Advent of Code 2022

## Spoiler alert

This repository contains my solutions to the Advent of Code 2022.

## Some random thoughts

During the last month, I've been using Rust exclusively, so I thought this year's Advent of Code would be a good opportunity to write some code using Kotlin again. At first, I was kind-of happy, as the Kotlin code usually worked and appeared like less code, so less work to me. Then, I quickly learned that less code does not mean less work. Kotlin has terrible error messages that don't always point you in the right direction or otherwise lack crucial information, like saying that a method cannot be called on this type, without saying what this type is, and then listing a bunch of irrelevant function signatures. Or instead of saying that it cannot infer type information, just inferring the Nothing type and then giving a bunch of other unhelpful errors. Or highlighting the entire file in red because at the top, I used -> instead of : to separate the function arguments from the return type. Pretty stupid.

So long story short, I'm continuing the days with Rust, as solving the Advent of Code is fun even if I'm not doing it for refreshing my knowledge of Kotlin. While the Rust code is objectively longer, it is easier to write than Kotlin, has fewer bugs, and those bugs are easier to debug and fix. In 2022, there is just no excuse to write bad, unhelpful compilers. Rust has proven this to be quite possible, and while I don't think that Rust is the single best programming language that will ever exist, it looks like from the currently existing programming languages I've tried so far, it absolutely is.