July 09, 2015
On Thursday, 9 July 2015 at 19:19:42 UTC, Walter Bright wrote:
> On 7/9/2015 12:56 AM, deadalnix wrote:
>> Several of which actually use linked list for list and probably shouldn't
>> provide random access.
>
> Yes. Consider:
>
>     for (int i = 0; i < list.length; ++i)
>           sum += list[i];
>
> If indexing was allowed on a list, this would seem like perfectly reasonable code.

Yes, which is why it's so ridiculous that the List interface in Java provides indexing via the at function. Both ArrayList and LinkedList implement it, which is reasonable in the case of ArrayList and stupid in the case of LinkedList.

- Jonathan M Davis
July 09, 2015
On Thursday, 9 July 2015 at 20:57:54 UTC, Tofu Ninja wrote:
> On Thursday, 9 July 2015 at 19:19:42 UTC, Walter Bright wrote:
>> On 7/9/2015 12:56 AM, deadalnix wrote:
>>> Several of which actually use linked list for list and probably shouldn't
>>> provide random access.
>>
>> Yes. Consider:
>>
>>     for (int i = 0; i < list.length; ++i)
>>           sum += list[i];
>>
>> If indexing was allowed on a list, this would seem like perfectly reasonable code.
>
> In many languages that is perfectly reasonable because list does not equal linked list. Its almost as if a list is an abstract concept and does not mean any one definite data structure, hmmm who wuda thunk that...

It's definitely true that the term list does not denote a particular data structure in computer science, so I disagree with Walter's reticence to use the term list with AliasList, but it's also true that some languages and libraries have stupidly put indexing on a linked list, which is what deadalnix was complaining about.

- Jonathan M Davis
July 09, 2015
On Thursday, 9 July 2015 at 19:45:21 UTC, Brian Rogoff wrote:
> And after all of the discussion, I like the name AliasSeq more.
> The fact that it sometimes elicits a 'WTF' reaction is perfect; it's a D thing (or a 'not normally exposed to the programmer thing') so you need to look up what it does. Using Tuple, List, or Array in the name is unhelpful, as those names are used a lot already.

Yeah. Arguably going with a weirder name has the advantage of making it so that you're less likely to assume that you understand it when you see it (since if you haven't studied up on it, you _don't_ understand it), whereas the other terms - especially Tuple - tend to make folks assume that they understand it when they really don't. No one understands TypeTuples/AliasSeqs without studying up on them. They're just too unique.

- Jonathan M Davis
July 10, 2015
On Wednesday, 8 July 2015 at 16:44:13 UTC, Jonathan M Davis wrote:
> On Wednesday, 8 July 2015 at 14:45:55 UTC, Xiaoxi wrote:
>> 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).
>
> LOL. Then what about when you use it for _parameters_ rather than arguments? Or when you use it areas that have _nothing_ to do with functions - e.g.
>
> foreach(S; TypeTuple!(string, char[], wstring, dstring))
> {
>     //...
> }
>
> Naming it Arguments gives the impression that it's specifically related to arguments, and that's just one small area that it gets used in. And that's part of what's so hard about naming it. It just does way too many things to name easily.
>
> - Jonathan M Davis

You just made the argument for calling it Arguments by arguing against its name being Arguments.

arguments and parameters are both basically the same thing and so is the example where you use it as the arguments to a foreach loop.

Most of the suggestions are too low level, fact is its a Tuple :D


July 10, 2015
On Thursday, 9 July 2015 at 19:10:39 UTC, Jonathan M Davis wrote:
> On Thursday, 9 July 2015 at 18:45:56 UTC, Marc Schütz wrote:
>> Interestingly, it goes on by saying:
>>
>>> An n-tuple is defined inductively using the construction
>>> of an ordered pair.
>>
>> Although not stated explicitly, this implies (a kind of) auto expanding!
>> => Fits more than perfectly :-P
>
> No one who has ever seriously used tuples in any programming language I've ever heard of would expect tuples to auto expand. Auto expansion makes them _considerably_ less useful. In the case of TypeTuple/AliasSeq, the situation is a bit different, because we're not really talking about tuples here. Real tuples nest, and they don't auto expand.

But my quote above that they _don't_ nest and _do_ auto-expand, how else could you construct n-tuples from pairs?

> TypeTuple/AliasSeq is the _only_ case I've ever seen where someone tried to claim that something was a tuple when it didn't nest, or it auto-expanded. Folks have been consistently confused about the differences between TypeTuple and std.typecons.Tuple and the fact that TypeTuples auto expand. No one expects it - because tuples just don't do that in any actual programming languages. I question the validity of your interpretation of the theory as well, but even if it's valid, it doesn't match what's done in actual programming languages.

I personally think this auto-expanding argument is overrated. I don't have any particular expectation regarding auto-expansion towards the concept "tuple". Sure, it may be surprising, but that doesn't stop an auto expanding tuple from being a tuple, just like Perl arrays being auto-expanding doesn't stop them from being arrays.
July 10, 2015
On Friday, 10 July 2015 at 08:37:56 UTC, Marc Schütz wrote:
> I personally think this auto-expanding argument is overrated. I don't have any particular expectation regarding auto-expansion towards the concept "tuple".

But he's right that we have auto-expanding and non-expanding tuples, so having a different term for the auto-expanding one would help a bit.

July 10, 2015
On Friday, 10 July 2015 at 08:42:44 UTC, Martin Nowak wrote:
> On Friday, 10 July 2015 at 08:37:56 UTC, Marc Schütz wrote:
>> I personally think this auto-expanding argument is overrated. I don't have any particular expectation regarding auto-expansion towards the concept "tuple".
>
> But he's right that we have auto-expanding and non-expanding tuples, so having a different term for the auto-expanding one would help a bit.

Only minimally. We also have different kinds of ranges, but their names are all just "XxxRange". I can of course only speak for myself, but having a `Tuple` and an `AliasTuple`, one auto-expanding and the other not, doesn't confuse me.
July 10, 2015
On Friday, 10 July 2015 at 08:42:44 UTC, Martin Nowak wrote:
> But he's right that we have auto-expanding and non-expanding tuples, so having a different term for the auto-expanding one would help a bit.

This unpacking is called splatting in some other PLs that have a splat operator. Maybe we can use that to describe the unpackedness, e.g. AliasSplat.
July 10, 2015
On Friday, 10 July 2015 at 08:37:56 UTC, Marc Schütz wrote:
> I personally think this auto-expanding argument is overrated. I don't have any particular expectation regarding auto-expansion towards the concept "tuple". Sure, it may be surprising, but that doesn't stop an auto expanding tuple from being a tuple, just like Perl arrays being auto-expanding doesn't stop them from being arrays.

You know there a thing scientific do that is called experiment. In this case the experiment of calling this a tuple has been made, and it confused the hell out of everybody for years.

You can argue against reality all you want. The fact is, people expect tuples to not autoexpand.

July 10, 2015
On Friday, 10 July 2015 at 10:05:19 UTC, deadalnix wrote:
> On Friday, 10 July 2015 at 08:37:56 UTC, Marc Schütz wrote:
>> I personally think this auto-expanding argument is overrated. I don't have any particular expectation regarding auto-expansion towards the concept "tuple". Sure, it may be surprising, but that doesn't stop an auto expanding tuple from being a tuple, just like Perl arrays being auto-expanding doesn't stop them from being arrays.
>
> You know there a thing scientific do that is called experiment. In this case the experiment of calling this a tuple has been made, and it confused the hell out of everybody for years.
>
> You can argue against reality all you want. The fact is, people expect tuples to not autoexpand.

the reason tuple was confusing is because it's already used by another completely distinct type.