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



--- Comment #17 from Andrei Alexandrescu <and...@metalanguage.com> 2011-07-22 
11:44:32 PDT ---
(In reply to comment #15)
> Say we have this:
> 
> struct Foo
> {
>     int value;
>     alias value this;
> }
> 
> If an "instance" of Foo is passed to a function taking variadic arguments then
> it's received as Foo and not int, correct? Why would an alias this with a 
> tuple
> behave any different. In that case you would have to manually expand it.

This is not only about variadic arguments, sorry for being confusing. It is
about the combinatorial explosion when overloading rules meet automatic
expansion. Again, please consider this example:

fun(t1, t2, t3, t4);

and consider:

* fun may have an arbitrary number of overloads
* Some or all of t1 through t4 may be tuples, some also including tuples of
tuples

The fact that there exists an algorithm to find an expansion (albeit in
potentially a long time) is little solace when we consider the complexity
inflicted on the human reader.

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

Reply via email to