3 ms·
> What if the requirements were very slightly different, and you needed to do something different in the middle of the sequence, like writing a register of a di
by MaulingMonkey 10y ago
> What if the requirements were very slightly different, and you needed to do something different in the middle of the sequence, like writing a register of a different size or sleeping for a millisecond?
Interestingly, I'd argue this is actually a great argument for brittleness in this case. The table oriented code makes it clear to the reader that no such subtle edge cases exist, improving the readability of the code.
Although a local macro or better error handling system would also make such things a bit clearer too.
- LeifCarrotson 10y ago> The table oriented code makes it clear to the reader that no such subtle edge cases exist, As an occasional embedded systems programmer, initialization code without subtle edge cases only exists in artificial examples like this one.