[Issue 6365] AutoTupleDeclaration
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jul 24 11:43:33 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6365
--- Comment #19 from Kenji Hara <k.hara.pg at gmail.com> 2011-07-24 11:43:28 PDT ---
(In reply to comment #18)
> Are you sure you want to use that syntax?
Yes. The syntax is usuful for tuple expansion and non-auto binding:
const (x, y) = tuple(10, 20);
// x and y are now const
It is more usuful for many element tuple:
(const x, const y, const z, const v, const w, const m, const n) = ... ;
// same as:
// const (x, y, z, v, w, m, n) = ... ;
> A syntax more similar to the Python one is:
>
> auto (x1,) = [10];
In D, Isolated comma is almost invalid except enum declaration, I think.
D is not Python.
--
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