My thoughts & experiences with D so far, as a novice D coder

Timon Gehr timon.gehr at gmx.ch
Wed Mar 27 14:52:43 PDT 2013


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.


More information about the Digitalmars-d mailing list