[Issue 6365] AutoTupleDeclaration

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 2 06:39:56 PDT 2011


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



--- Comment #27 from Kenji Hara <k.hara.pg at gmail.com> 2011-08-02 06:39:43 PDT ---
(In reply to comment #26)
Thanks for your reply.

I have two claims.

1. D language specification already implicitly allow automatic tuple expansion.

  a) Alias ​​this allows an implicit conversion to aliased symbol.
  b) We can take tuple symbol (= TupleDeclaration) as aliased symbol.

  The above two items lead automatic expansion naturally.
  If you prohibit that, it will make a serious exception to the language
specification.
  Dealing with the tuple expansion by alias this may complicate the
implementation of the compiler, but will not introduce an exception of language
specification.


2. Tuples are anonymous structures, and itself has no meaning.

  We should treat tuples as open, not closed.

 void f1(Point p); // struct Point{ int x, y; }
 void f2(int n, int m);

  The parameters of f1 and f2 are fundamentally different. And where
Tuple!(int, int) belongs to? I think it is same as parameters of f2.
  Therefore we need automatically expansion.

It seems to me that Tuple is essential feature to a modern language (like a
Unix pipe) .
And I believe that D is one of the very few languages that can treat it with
type-safe.

I did mark issues - 2779, 2781, 6366, 6369 as *BUG*.
Please think seriously about tuple expansion and alias this.

Sorry to my poor English.

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