I dun a DIP, possibly the best DIP ever
Adam D. Ruppe
destructionator at gmail.com
Sat Apr 25 20:34:45 UTC 2020
On Saturday, 25 April 2020 at 21:21:12 UTC, Walter Bright wrote:
> I don't know why it was changed to AliasSeq, which just grates
> on me as not indicating at all what it is.
People used to get confused over std.typecons.Tuple and the old
TypeTuple. Moreover, TypeTuple can hold more than just types, so
AliasSeq is arguably more descriptive.
Of course, there's still .tupleof on structs which is more of an
AliasSeq than a Tuple so the joy of confusion remains.
> Not a bad idea. (.. is also used in case ranges)
eh case range is a different beast entirely. Though case 1..10:
could perhaps expand to case 1: .. case 9:, I'd be OK having both.
But that shows a key difference: foreach range is exclusive, case
range is inclusive.
> I've also thought that more templates than AliasSeq might be
> suitable for compiler short-cutting.
yessss
though this staticMap... thing combined with CTFE arrays can
replace a bunch of these templates. i'm still letting some cases
percolate through my brain but it is a nice day outside today so
I don't wanna spend 3 hours typing examples yet.
yet ;)
More information about the Digitalmars-d
mailing list