[Issue 4666] Optional name for std.typecons.Tuples?

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 7 13:23:36 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4666



--- Comment #2 from bearophile_hugs at eml.cc 2010-10-07 13:23:09 PDT ---
(In reply to comment #1)
> Hm. Fair point, though I fear it could create more confusion than convenience.

This was just a suggestion, it's not an important thing.

If Tuples get more compiler support and become more like structural types, then
the optional name is able to turn them back again into nominal typing (if their
name differs, they need to be considered different types, even if everything
else is the same).


> After all anyone can define a function that prints the tuple however they want.

This is surprisingly uncommon in Python (and I think in D too). When you need a
special printing function you quite probably prefer to define a struct with
opString instead a free function that accepts a tuple of a certain type.

This means that default printing of tuples needs to be good.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list