Tuple/TypeTuple etc.

Dicebot public at dicebot.lv
Fri Aug 16 13:26:31 PDT 2013


On Friday, 16 August 2013 at 19:35:56 UTC, Jonathan M Davis wrote:
> But TypeTuple and the built-in ones _aren't_ different. 
> TypeTuple is an alias
> for the built-in ones that's required because of the lack of 
> syntax for
> declaring them on their own.

That is intention but not implementation. There some cases where 
you can simply enumerate stuff via comma but can't use TypeTuple. 
There are cases where you can use TypeTuple but can't express the 
same thing with any built-in syntax. Recent discoveries on topic 
in bugzilla and digitalmars.learn have really frustrated me and I 
have considered myself somewhat experienced D user.

> Adding a syntax for TypeTuple, making TypeTuple redundant would 
> be great, but
> Bearophile seems to be arguing that having some sort of tuple 
> syntax would
> make it so that we don't need TypeTuple and Tuple..

Does he? I missed that from his comments. bearophile, is that 
true? :)

std.typecons.Tuple should be left untouched, of course, because 
it serves important goal - constructing a type (as module name 
suggests), something that can be used in ABI realm. It can make 
use of better integration with built-in tuples but it is a 
distinct topic.


More information about the Digitalmars-d mailing list