Why is Simple Code So Often Bad?

from blog openmymind.net, | ↗ original
I recently wrote a Prometheus client library for Zig. I had to write a custom hash map context (what Zig calls the eql and hash functions) which led to my last couple blog posts exploring Zig's hash maps in more details. The last topic covered was the getOrPut method which returns a pointer to the key and value arrays of where the entry is or...