I had a vague memory of a discussion like this from a few weeks ago. In searching for it, I found this one from a year ago: https://groups.google.com/d/msg/julia-users/qJa2EyUXJfo/gVtFJKkHv4AJ
It outlines in more depth the complexity here, and I found it to be rather illuminating, with some points and clarifications that haven't been made here. On Thursday, June 12, 2014 5:18:34 PM UTC-4, [email protected] wrote: > > With regard to S. Karpinski's counterexample regarding sort, I'm not sure > I understand the problem. If sort! is defined to take a vector v as input, > and meanwhile f is defined to take a const-vector v and function g as > input, then if the user tries to call g(v), then the compiler will emit an > error because it cannot convert const-vector to vector. Anyway, this is > how it would work in C++. Doesn't this solve the problem? > > -- Steve Vavasis >
