Wait, what? What is AliasSeq?
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jul 8 02:00:56 PDT 2015
On Tuesday, 7 July 2015 at 22:22:02 UTC, Walter Bright wrote:
> On 7/7/2015 2:20 PM, David Nadlinger wrote:
>> On Tuesday, 7 July 2015 at 21:15:40 UTC, Andrei Alexandrescu
>> wrote:
>>> So I thought we were supposed to replace bad names with good
>>> names. Template
>>> arguments are indexable, so "sequence" doesn't quite apply.
>>
>> Apparently Walter was opposed to using List, as that would
>> somehow imply "linked
>> list".
>
> I opposed it because lists are not indexable, and tuples are.
Linked lists are not indexable, but the term list doesn't
necessarily imply that it's a linked list. The term list just
means that you have a group of items in linear order. In fact, if
you're looking for a generic name for any kind of linear group of
items (be it a linked list or an array or whatever), I would
think that list is about as generic as you get. And it says
nothing about indexability one way or the other.
The core problem here is that the thing that we're trying to name
here is too much of a hodgepodge of different things to name it
well. It's not really a tuple, since it's not nestable, but list
and sequence are kind of odd names too, because in programming,
with almost everything other than a tuple, you expect all of the
items in the structure to be the same type, which isn't the case
here.
Going with Alias seems to solve the problem of whether it holds
types or values or symbols well. It also deals well with whether
it's used for arguments or parameters or something else. So, I
think that going with Alias is a good move.
As for Seq, it's kind of ugly, but if understand that it's
Sequence, I think that that fits well enough. Personally, I'd
prefer List over Seq, but if you're vetoing List, then I don't
know what else we're going to go with. _Nothing_ fits perfectly.
TypeTuple/AliasSeq/Whatever is just too unique and too much of a
hodgepodge for any name to really well.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list