LaTeX3 provides a well thought out low level programming environment. There is a lot the (La)TeX programmer can learn about good coding practice from the current experimental code, and I’m trying to use this in
siunitx version 2. There are lots of little points that I could highlight, but I’ll pick a few out:
\si@num@out@uncert@int, a function in
siunitx2 for processing the output of the integer part of an uncertainty in a number. Logical names make for easier to follow code.
@auxto a function name to show an auxiliary part of another macro, rather than some complex vowel substitution using
\expandafterruns all over the place.
I’m also taking some of the other ideas in
siunitx version 2. For example, where possible I’m aiming only to use
\edef where it is really needed (unknown levels of expansion). If something needs to be expanded a known number of times, I’m going for controlled expansion instead. I’ve also really like the idea of switches that don’t use
\iftrue to work: much less risk of problems.