[Issue 6365] AutoTupleDeclaration

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 23 08:28:10 PDT 2011


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



--- Comment #10 from Kenji Hara <k.hara.pg at gmail.com> 2011-07-23 08:28:08 PDT ---
(In reply to comment #7)
> One simple syntactic matter is that we can't extend the existing syntax to work
> with specified types. That means the user must use "auto" but cannot specify
> the types of the variables defined.
> 
> To allow that in the future, we need to move the paren before the auto:
> 
> (auto i, j) = tuple(1.2, "a");
> 
> Then the syntax can be later extended to:
> 
> (double i, string j) = tuple(1.2, "a");
> 
> Anyway, we should wait for Walter to weigh in. Thanks Kenji for this work.

How about this syntax?
auto (i, j) = tuple(1.2, "a");
(double, string) (i, j) = tuple(1.2, "a");

-- 
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