Thread overview | |||||
---|---|---|---|---|---|
|
December 03, 2010 sarrays are value types? | ||||
---|---|---|---|---|
| ||||
I might just be having one of those moments, but if static arrays are value types, doesn't it make more sense that arr1 = arr2; performs a value copy than a reference copy? |
December 03, 2010 Re: sarrays are value types? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ellery Newcomer | Ellery Newcomer <ellery-newcomer@utulsa.edu> wrote: > I might just be having one of those moments, but if static arrays are value types, doesn't it make more sense that > > arr1 = arr2; > > performs a value copy than a reference copy? That's what it does. Not a deep value copy, of course, but a value copy. -- Simen |
December 06, 2010 Re: sarrays are value types? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Simen kjaeraas | Simen kjaeraas: > That's what it does. Not a deep value copy, of course, but a value copy. See also: http://d.puremagic.com/issues/show_bug.cgi?id=3971 Bye, bearophile |
Copyright © 1999-2021 by the D Language Foundation