DIP54 : revamp of Phobos tuple types

Timon Gehr timon.gehr at gmx.ch
Sun Dec 29 21:59:59 PST 2013


On 12/30/2013 05:51 AM, Dicebot wrote:
> On Monday, 30 December 2013 at 04:25:22 UTC, Timon Gehr wrote:
>> If you are going to claim that this is not proper creation of an
>> instance of a type, except that:
>>
>> int x;
>> static assert(is(typeof(x)==int));
>>
>> Seq!(int, double) y;
>> static assert(is(typeof(y)==Seq!(int, double))); // presumably "bad"
>>
>> Then I don't know what to tell you. It is not useful at all to make a
>> terminological distinction between the two cases above and claim that
>> one is somehow special and confusing, when everything actually behaves
>> in an uniform way.
>
> Same as type list is not type but list of types,

Both.

> expression list is not an instance but list of aliases to instances.

Both.

> This is important distinction terminology-wise at least

I don't think the terms are mutually exclusive. D eliminates the 
distinction.

> and pretty much the reason this thing has no ABI which is huge semantical thing on its own.
> ...

The reason it has no ABI is that it cannot be returned from functions. 
(Which the spec mentions as a TODO and I support as a non-standard 
extension.)

> I'd love it to be designed and implemented in such way (I have even
> posted such proposal in past) but it is not the case for both DMD and
> spec right now. I am not an expert in DMD internals so I am taking Don's
> word on this (we have been talking on this topic some time ago in person).

I think both the spec and the external behaviour of DMD support the 
viewpoint that type lists are also types.


More information about the Digitalmars-d mailing list