--- Comment #8 from Andrei Alexandrescu <> 2011-07-22 
10:02:50 PDT ---
I agree with your consistency argument. But there are many other angles. We
definitely want to avoid automatic expansion in function arguments, where I
think any consistency advantage is pale compared to the numerous liabilities. I
can think of a huge amount of examples, e.g. multiple-arguments functions:

fun(t1, t2, t3, t4); // some or all are tuples

There are a combinatorial amount of possible expansions. By the consistency
argument, you should try all and use what works if there's only one match. But
also that would cause the head of the reader to explode. We simply can't allow
such a thing in the language.

Here's what I suggest we do to move things forward: change your pull request to
only improve "foreach (e; tup)" which is a net step forward. That request has a
much better chance of getting approval.

I'm not sure about the "foreach (i, c; r)" case because we can't implement ref
arguments properly, so probably we need to discuss that some more.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to