On 5/4/2013 4:03 PM, Andrej Mitrovic wrote:
On 5/4/13, Walter Bright <newshou...@digitalmars.com> wrote:
Andrei & I argued that we needed to make it work with just ref annotations.

So to recap, 2.063 turns slices into r-values which will break code
that used ref, e.g.:

-----
void parse(ref int[] arr) { }

void main()
{
     int[] arr = [1, 2];
     parse(arr[]);  // ok in 2.062, error in 2.063
}
-----

Do you mean that is an error now with HEAD?


Then the user might introduce a non-ref overload:

-----
void parse(ref int[] arr) { }
void parse(int[] arr) { }  // picks this one
-----

And later down the road, maybe even in 2.064, ref will take r-values
making the new code error because of ambiguity between the two
functions.

Has code breakage ever been taken into account during this dconf conversation?

I don't know of any code it would break.

Reply via email to