On 03/27/2013 07:20 PM, Andrei Alexandrescu wrote:
On 3/27/13 1:23 PM, Timon Gehr wrote:
- Function that never return are inferred void. I would have preferred
typeof(null) as void lead to many static and repetitive code for nothing
when doing metaprograming.
I strongly disagree.
Ideally such function should return a "none" type, the bottom of the
hierarchy lattice. We don't have such, so returning typeof(null) (which
we do have) is the next best choice as it's just above bottom.
Andrei
Maybe it is one next best choice. It is still a horrible choice.
It's not any more just above bottom than the following type:
struct JustAboveBottom{ }
We should either go with the real thing or do nothing about it.