Re: dup and arrays

2010-03-26 Thread Philippe Sigaud
On Sat, Mar 27, 2010 at 03:34, strtr wrote: > Ellery Newcomer Wrote: > > > I just noticed that dup does not dup deep. > > > > In a two second search I couldn't find any reason for or against, but > > I'd kinda like it if > > > > auto r2 = r.dup; > > r2[i][j] = 0; > > r[i][j] = 1; > > assert(r2[i]

Re: dup and arrays

2010-03-26 Thread strtr
Ellery Newcomer Wrote: > I just noticed that dup does not dup deep. > > In a two second search I couldn't find any reason for or against, but > I'd kinda like it if > > auto r2 = r.dup; > r2[i][j] = 0; > r[i][j] = 1; > assert(r2[i][j] != r[i][j]); > > held. There have been discussions about t

dup and arrays

2010-03-26 Thread Ellery Newcomer
I just noticed that dup does not dup deep. In a two second search I couldn't find any reason for or against, but I'd kinda like it if auto r2 = r.dup; r2[i][j] = 0; r[i][j] = 1; assert(r2[i][j] != r[i][j]); held.