-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple in
arguments will generate exponential number of calls
#76
Comments
It is an optimization for when not all combinations are possible. In this case, they are, so you get the worst case. |
The proposal says "it would not be scalable to implement a combinatorial set of branches for every combination of arguments" and yet that's what we should expect from this design. The proposal is quite misleading on this point. |
Right, that's not what cppfront implements. This is the main change to parameter passing since the d0708 paper, and I haven't updated the paper yet. For several reasons (including the one you give), cppfront implements separate See the parameter passing part of the talk, particularly this 1-min clip from the talk about |
Herb can I ask, do you think the paper's treatment of |
@seanbaxter There were several reasons I split
So what happened was that I recognized this |
The D0708/A.4 Section "Multiple
in
and/orforward
in the same definite last use" section has wording for avoiding an exponential number of function calls, but I don't think it does that.In cpp2:
I would expect a 16-way switch here, as each of the four invented parameters of
func
will be deduced as eitherstd::string
orconst std::string&
. What is the utility of the four bullet-point subsumption language? You have to perform OR for each combination of argument value categories, and you're necessarily locked into the bad brute-force implementation.The text was updated successfully, but these errors were encountered: