StatsModels.jl
StatsModels.jl copied to clipboard
Allowing a term to be empty should be useful for operations on terms
Operations like () + term(:x) and termvars(()) are disallowed by #214. But, I actually find them convenient.
I understand that empty tuples should not be turned into a TupleTerm (#213). But, I don't see why a term should never be empty. There are use cases in which some manipulation on terms are involved. An "empty term" may well arise in the intermediate process. After #214, the possibility of becoming empty need to be handled separately.
A fix that wraps NTuple inside a custom type for Terms seems to be a more appealing alternative.