There is an opinion that it is impossible to write a general purpose emptiness detector macro:
/*
* Expands to token 1 if the argument list is empty.
* Expands to token 0 if the argument list is not empty (excluding comments).
*/
#define IS_EMPTY(...) /* ??? */
However, some "close-to" implementations do exist.
Questions:
- Can someone provide a formal proof or at least a correct argumentation proving / convincing that it is impossible to implement the general purpose emptiness detector macro?
- Since some "close-to" implementations do exist, the question is: how close are we to the boundary at which "close-to" implementation becomes "general" implementation?
Note: One opinion is that we are awfully close. But how awfully exactly? How we can estimate this (numerically or using other metrics / indicators)?