It's an 8-bit counter... just allocate a fixed 256 entries and be done with it. That reads like code written by people without any embedded/low-level experience.
Keeping code simple and without unnecessary abstraction is a far more valuable skill than $safe-language-trend-of-the-day.
Keeping code simple and without unnecessary abstraction is a far more valuable skill than $safe-language-trend-of-the-day.