Wait, what? What is AliasSeq?
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 17 12:49:07 PDT 2015
On Wednesday, 15 July 2015 at 21:44:37 UTC, Timon Gehr wrote:
> On 07/15/2015 05:35 PM, Dicebot wrote:
>> On Wednesday, 15 July 2015 at 15:29:25 UTC, Andrei
>> Alexandrescu wrote:
>>>> It doesn't confuse me. We have type tuples and expression
>>>> tuples defined
>>>> in the spec. An alias tuple can have both expressions and
>>>> types. It's
>>>> not that confusing. What was confusing is that a TypeTuple
>>>> was not a
>>>> type tuple as defined in the spec.
>>>
>>> I agree.
>>>
>>> Andrei
>>
>> I want to point out that statement "an alias tuple can have
>> both
>> expressions and types" is somewhat between imprecise and just
>> wrong with
>> current compiler implementation. `X!(42, int, foo)` doesn't
>> hold aliases
>> to value, type and symbol (assuming X(T...)) - it does hold
>> actual value
>> and type, with only symbol being aliased. Actual alias tuple
>> would be
>> defined as `X(alias a, alias b, alias c)` and is somewhat
>> different thing.
>>
>> You may want to ignore that difference for simplicity sake but
>> it needs
>> to be explicitly acknowledged.
>
> It should instead be acknowledged that there /should/ be no
> difference in what three things can be passed to X(T...) and
> X(alias a, alias b, alias c). The X(T...) if(T.length==k)
> pattern is ridiculous.
I can't agree more.
More information about the Digitalmars-d
mailing list