adventofcode-2021

By avorobey

Adventofcode-2021 Alternatives

Similar projects and alternatives to adventofcode-2021

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better adventofcode-2021 alternative or higher similarity.

adventofcode-2021 reviews and mentions

Posts with mentions or reviews of adventofcode-2021. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-12-27.
  • A Review of the Zig Programming Language (Using Advent of Code 2021)
    14 projects | news.ycombinator.com | 27 Dec 2021
    I also did AoC 2021 in Zig: https://github.com/avorobey/adventofcode-2021

    One thing the OP didn't mention that I really liked was runtime checks on array/slice access and integer under/overflow. Because dealing with heap allocation is a bit of a hassle, I was incentivized to use static buffers a lot. I quickly figured out that I didn't have to worry about their sizes much, because if they're overrun by the unexpectedly large input or other behavior in my algorithms, I get a nice runtime error with the right line indicated, rather than corrupt memory or a crash. Same thing about choosing which integer type to use: it's not a problem if I made the wrong choice, I'll get a nice error message and fix easily. This made for a lot of peace of mind during coding. Obviously in a real production system I'd be more careful and use dynamic sizes appropriately, but for one-off programs like these it was excellent.

    Overall, I really enjoyed using Zig while starting out at AoC problem 1 with zero knowledge of the language. To my mind, it's "C with as much convenience as could be wrung out of it w/o betraying the low-level core behavior". That is, no code execution hidden behind constructors or overloads, no garbage collection, straight imperative code, but with so much done right (type system, generics, errors, optionals, slices) that it feels much more pleasant and uncomparably safer than C.

    (you can still get a segmentation fault, and I did a few times - by erroneously holding on to pointers inside a container while it resized. Still, uncomparably safer)

Stats

Basic adventofcode-2021 repo stats
1
5
0.0
over 2 years ago

The primary programming language of adventofcode-2021 is Zig.

Popular Comparisons


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com