Comment by alexfoo

Comment by alexfoo 3 days ago

0 replies

Perl is my starting point.

It has many of the required structures (hashes/maps, ad hoc structs, etc) and is great for knocking up a rough and ready prototype of something. It's also quick to write (but often unforgiving).

I can also produce a solution for pretty much every problem in AoC without needing to download a single separate Perl module.

On the negative side there are copious footguns available in Perl.

(Note that if I knew Python as well as I knew Perl I'd almost certainly use Python as a starting point.)

I also try and produce a Go and a C solution for each day too:

* The Go solution is generally a rewrite of the initial Perl solution but doing things "properly" and correcting a lot of the assumptions and hacks that I made in the Perl code. Plus some of those new fangled "test" things.

* The C solution is a useful reminder of how much "fun" things can be in a language that lacks built-in structures like hashes/maps, etc.