July 08, 2015
On Tuesday, 7 July 2015 at 23:30:05 UTC, Andrei Alexandrescu wrote:
> In fact thinking of it AliasArray seems most descriptive. --

I think that that would be a really bad move, since we already use the term array for three other completely unrelated items in the language, and it really isn't an array in any kind of classic sense. It's an indexable list of heterogenous items where that list is a compile-time construct and not a runtime data structure. There's really nothing else like it, and the term array arguably carries even more baggage with it than tuple, and tuple has always been a bad fit - both because it implies that you can nest them (whereas they self-flatten) and because we already have tuples with std.typecons.Tuple. We'd be going from having two tuple types and three array types to one tuple type and four array types. Much as I think that it's a mistake to use the term tuple for TypeTuple/AliasSeq/etc., I think that it would be far better to name it AliasTuple than AliasArray.

- Jonathan M Davis
July 08, 2015
On Wednesday, 8 July 2015 at 08:59:15 UTC, deadalnix wrote:
> On Wednesday, 8 July 2015 at 08:53:52 UTC, Martin Nowak wrote:
>> On Wednesday, 8 July 2015 at 01:26:22 UTC, rsw0x wrote:
>>>> A sequence of aliases, personally I think it is a much better name. But maybe seq could be replaced with something else, though I don't really mind seq. AliasList seems a little bit better.
>>>
>>> it's far closer to a tuple, list, or array than a sequence.
>>
>> Mmh, TypeTuple had 2 problems, it didn't solely consist of types, and the term tuple is overloaded by value tuples.
>> But indeed AliasTuple would be descriptive name IMHO.
>
> Tuples are not expected to auto unpack either.

Yeah. Every name sucks. Alias seems to solve the first half of the name reasonably well, but nothing that anyone has come up with really solves the second half.

TypeTuples/AliasSeqs/Whatever really aren't tuples, because they don't nest, and they auto flatten (which pretty much no who has dealt with tuples before is going to expect from a tuple). So, tuples really gives the wrong impression, but it has the advantage of implying that it holds a heterogenous group of items, whereas pretty much anything else risks implying that it holds a homogeneous list of items.

Array (as Andrei has suggested) is already a very overloaded term in D, and it implies a runtime data structure, which this isn't. Certainly, when folks think of arrays, they're not going to think of anything like TypeTuple/AliasSeq.

List is by far the most generic, but it doesn't imply indexability, so Walter doesn't like - though Seq doesn't imply indexability either, so if that's his complaint, I don't see how it makes much differences whether we go with List or Seq. They seem pretty interchangeable to me.

Has anyone come up with anything other than Tuple, Array, List, or Seq? Simply throwing an "s" on the end like they did with Arguments? Then we have Aliases. I doubt that that's a good idea, but it would be an option.

As far as I can tell, _all_ of our options suck for one reason or another. If I had to pick, I'd pick List, simply because it's the most generic, and there won't be anyone complaining about what Seq might mean if they don't grok that it's Sequence, but it seems like no matter what we pick, there's going to be complaining.

- Jonathan M Davis
July 08, 2015
On Wednesday, 8 July 2015 at 09:00:58 UTC, Jonathan M Davis wrote:

> Personally, I'd prefer List over Seq,

Given that "list" has meanings other than "linked list" in several languages (Python and Racket come to mind), I don't see the problem. Perhaps someone with an extensive C or C++ background and little experience elsewhere automatically thinks "linked list", but someone coming from other languages will not. Hell, I don't really have much experiences outside of the C-family, but I don't think "linked list" when I see "list".

Furthermore, even the Wikipedia article on Lists makes a distinction:

"In computer science, a list or sequence is an abstract data type that represents a sequence of values, where the same value may occur more than once. An instance of a list is a computer representation of the mathematical concept of a finite sequence; the (potentially) infinite analog of a list is a stream.[1]:§3.5 Lists are a basic example of containers, as they contain other values. If the same value occurs multiple times, each occurrence is considered a distinct item.

The name list is also used for several concrete data structures that can be used to implement abstract lists, especially linked lists."

Given the nature of the data structure we're talking about, I think AliasList is a perfect fit. It's shorter than Sequence (the only good alternative I see atm) and List is a whole word, unlike Seq. More importantly, it's quite descriptive. Because of the baggage surrounding "tuple" in D and the use of "array" to already refer to static arrays and dynamic arrays/slices (and a data type in Phobos) I don't see either of those as viable options.
July 08, 2015
I have just giggled.

Wonder if there will be any proposals in this thread that haven't already been mentioned in same thread. Though now it is much more funny because you keep it renaming right in master repeating all already considered and discarded points.

Sorry for being overly sarcastic, but I just can't take this seriously anymore :)
July 08, 2015
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.
>
> What happened? Why are we replacing a crappy term with another crappy term?

I also saw this change and was horrified. It just replaced one bad named (Arguments) by another. I just didn't want to stir up further trouble. But now that it's on the table, here's my opinion:

For me, "sequence" always reminds me of the mathematical concept, where elements are of the same type (e.g. only real numbers, but not a mixture of scalars and vectors), and usually each element has some relation to either its predecessor, or its index. This doesn't fit with TypeTuples at all.

Likewise, an array (at least in D) always has exactly one element type. This doesn't apply to TypeTuples either.

The name I find most fitting to describe them is "tuple". The trouble with the former name is that it implies them being a tuple of types, although they don't need to be. So IMO we just need to find a better specifier.

(Personally I would be fine with "list", too, but Walter finds it misleading.)

I like "AliasTuple" as suggested by Martin, although it isn't a perfect fit either when you think of `alias` template params, which don't match `int`, while `int` can be an element of a TypeTuple. Alternatively "ArgumentsTuple", or "TemplateArgumentsTuple", but the latter is too long.
July 08, 2015
On Wednesday, 8 July 2015 at 09:13:27 UTC, Jonathan M Davis wrote:
> Has anyone come up with anything other than Tuple, Array, List, or Seq? Simply throwing an "s" on the end like they did with Arguments? Then we have Aliases. I doubt that that's a good idea, but it would be an option.

What's wrong with Aliases?
July 08, 2015
On Wednesday, 8 July 2015 at 09:13:27 UTC, Jonathan M Davis wrote:
> On Wednesday, 8 July 2015 at 08:59:15 UTC, deadalnix wrote:
>
> Yeah. Every name sucks. Alias seems to solve the first half of the name reasonably well, but nothing that anyone has come up with really solves the second half.
>
> [...]
>
> Array (as Andrei has suggested) is already a very overloaded term in D, and it implies a runtime data structure, which this isn't. Certainly, when folks think of arrays, they're not going to think of anything like TypeTuple/AliasSeq.
>
> List is by far the most generic, but it doesn't imply indexability, so Walter doesn't like - though Seq doesn't imply indexability either, so if that's his complaint, I don't see how it makes much differences whether we go with List or Seq. They seem pretty interchangeable to me.
>
> [...]
>
> - Jonathan M Davis

Perhaps in such case we are going to invent new word? How about a kind of portmoneu word? For example tree + heap => treap. And we can have alias+list => aliast. No one have such word before an no impure association.

July 08, 2015
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.
>
> What happened? Why are we replacing a crappy term with another crappy term?
>
>
> Andrei

Why not just iterate over every possible candidate and vote? Anyway, here is my unordered `list`:

Aliases,
AliasSet,
AliasList,
AliasEnum,
AliasRange,
AliasGroup,
AliasIndex,

Aliases has my vote.
July 08, 2015
On Wednesday, 8 July 2015 at 09:49:59 UTC, ixid wrote:
> On Wednesday, 8 July 2015 at 09:13:27 UTC, Jonathan M Davis wrote:
>> Has anyone come up with anything other than Tuple, Array, List, or Seq? Simply throwing an "s" on the end like they did with Arguments? Then we have Aliases. I doubt that that's a good idea, but it would be an option.
>
> What's wrong with Aliases?

Well, it says less about what it is than something like AliasList or AliasTuple would, but it also runs afoul of the same problem that std.container.Array does. It's using the same name as something else that's commonly talked about but means something quite different (even if it's related). When folks talk about aliases right now, they do _not_ mean Aliases. They're talking about stuff like

alias foo = bar;

And renaming TypeTuple to Aliases is just going to increase confusion.

- Jonathan M Davis
July 08, 2015
On Wednesday, 8 July 2015 at 14:18:20 UTC, Jonathan M Davis wrote:
>
> And renaming TypeTuple to Aliases is just going to increase confusion.
>
> - Jonathan M Davis

It's basically just __VA_ARGS__ on steroids, thus 'Arguments' is good, there's precedence in C(Args).