I don't know what mathematical purity has to do with anything, I was just thinking Principle of Least Surprise, which is a user experience plus. Of course, I'm just going by what I would find least surprising and most useful, but I've heard lots of people express confusion about the behavior described in the StackOverflow question, so it does seem like there's room for improvement here.