I dun a DIP, possibly the best DIP ever

Walter Bright newshound2 at digitalmars.com
Sat Apr 25 21:21:12 UTC 2020


On 4/25/2020 4:25 AM, Manu wrote:
> It's still un-fun to type AliasSeq!(), and I've never liked how it reads or 
> looks... but your patch is certainly welcome.

It was originally TypeTuple!(), and still is in druntime. (Yes, the PR 
recognizes TypeTuple, too, as it recognizes the pattern, not the identifier.) I 
don't know why it was changed to AliasSeq, which just grates on me as not 
indicating at all what it is. Probably Tuple would be the best name.


> What we really need, is this:
>    AliasSeq!(0 .. 10)
> 
> We should allow integer `..` range in a tuple to describe an iota. We allow it 
> in foreach statements, it's a sadly missed opportunity for D.

Not a bad idea. (.. is also used in case ranges)

I've also thought that more templates than AliasSeq might be suitable for 
compiler short-cutting.



More information about the Digitalmars-d mailing list