A Discussion of Tuple Syntax

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Aug 19 10:44:18 PDT 2013


On Mon, Aug 19, 2013 at 07:34:38PM +0200, Dicebot wrote:
> On Monday, 19 August 2013 at 17:22:26 UTC, H. S. Teoh wrote:
> >What I'd like to know, is how all of these proposals address the
> >fundamental differences between "symbol tuples" (compile-time
> >construct)
> 
> Those are not symbol tuples. For example, `int` is not a symbol.
> http://dlang.org/template.html#Symbol - only things that have
> identifiers and template instances are symbols.

Well, OK, whatever they're supposed to be called. Compiler-tuples, or
expression tuples, or whatever. See, part of the problem is that they
just don't have any good name that correctly conveys what they are.
Calling them "tuple" only adds to the confusion because of the
conflation with std.range.Tuple.


> >As far as I can tell, people are still confusing the two, and it's
> >really not helping.
> 
> Completely removing TypeTuple from library (which native syntax will
> enable) will help to remove large part of confusion.

That's only part of the problem. It doesn't solve the problem of
conflation between these tuples and std.range.Tuple, and from what I can
tell in these threads, people are still confusing the two. Both of them
being named some kind of "tuple" doesn't help the problem.

This is one of the things about D that's seriously WAT-worthy.


T

-- 
If it breaks, you get to keep both pieces. -- Software disclaimer notice


More information about the Digitalmars-d mailing list