Closed Palatis closed 7 years ago
I understand this is an "programming interface breaking" commit, but 50 function pointers is taking up 100 bytes of memory... i rather use it for the cmd cache instead of bunch of callbacks...
If you don't need dedicated callbacks - don't use them. Just set MAXCALLBACKS to 0 and use default callback handler with switch-case.
waists one byte of memory to store callbacks[0]
... XD
I think for most people the convenience of having the callback mechanism outweighs the loss of available memory, especially if they adjust MAXCALLBACKS to required number. Additionally, as @valkuc says, you can effectively disable the functionality and add your own switch statement,
yeah working on a version that's easier for the user to choose from what to do, which don't break backward compatibility.
taking too much memory space... just do it in the default handler with a big switch-case would be more memory efficient (saved a bit code space, too)...