Deprecation plan for TypeTuple?
Jonathan M Davis
newsgroup.d at jmdavisprog.com
Fri Jan 17 13:06:34 UTC 2020
On Thursday, January 16, 2020 11:17:03 AM MST H. S. Teoh via Digitalmars-d
> On Thu, Jan 16, 2020 at 04:13:31PM +0000, berni44 via Digitalmars-d wrote:
> > I know, this question has been asked 4 years ago where the answer was
> > essentially that we should wait some time... Now, what's the current
> > state?
> I thought `TypeTuple` already doesn't compile, and you have to use
> `AliasSeq` now?
Originally, TypeTuple was left in undeprecated, because it was so heavily
used and so much code would get deprecation messages if we actually
deprecated it. So, we added AliasSeq and told people to switch to using it,
but we didn't actually do anything to TypeTuple. We might have removed it
from the documentation at some point (I don't recall), but it was never
actually deprecated. I don't know how disruptive it would be to deprecate it
> Although there's still the ongoing problem of the compiler docs still
> referring to "tuples", and "AliasSeq" being a real mouthful that people
> have a hard time understanding without spending a lot of time to learn
> what it is.
There isn't _any_ name which doesn't have problems. They aren't tuples as
tuples are normally defined (e.g. they don't nest), and they can hold a
combination of types and values. It's not even entirely accurate that it's a
sequence of aliases. No matter what you name it, you have to explain it.
AliasSeq was the best of a list of bad names, and it caused fewer bad
assumptions than other names like TypeTuple do. So, it was the winner when
we decided to rename TypeTuple to try to reduce the confusion.
- Jonathan M Davis
More information about the Digitalmars-d