Wyatt:

I don't like the "t".

I know. So far we haven't found a syntax that is technically acceptable (this means backwards compatible, etc), not too much onerous in some ways, and much better than t{} (but of course syntax is a bit subjective, so others can find other syntaxes acceptable. In such cases Python developer team discusses, they vote one or more times, and at the end the benevolent Python dictator Guido V. Rossum reads the discussions and vote results and expresses the final decision, his words are more or less final). It's short, clear, has a precedent with q{}. I don't like it a lot, but it's way better than not having language support for tuples.


I'd prefer just using parentheses, but I think there were readability problems that caused the DIP to end up with:

More than just readability problems. They were discussed when Kenji presented the DIP 32 in this forum. Timon found a significant problem with the {} syntax.


"Basic () syntax, perhaps the cleanest, but can't be used:"
Though there's nothing else written about that.

I have added those parts and comparisons in the DIP :-)
http://wiki.dlang.org/?title=DIP32&action=history

If you think some comments are missing feel free to add them, it's a Wiki.

----------------------

Jonathan M Davis:

Since the built-in tuples / std.typetuple.TypeTuple and std.typecons.Tuple are fundamentally different, I don't see how you could possibly combine the two
in a single syntax. You'd need different syntaxes for each one.

You are right, they are different things, sorry.
But let's hypothesize there is only one syntax for both of them. What bad things are going to happen? Can't the compiler infer by itself what of the two kinds you want to use?

Bye,
bearophile

Reply via email to