Re: Is it bad practice to alter dynamic arrays that have references to them?

2010-08-05 Thread Steven Schveighoffer
On Thu, 05 Aug 2010 15:23:13 -0400, simendsjo wrote: On 05.08.2010 20:50, Steven Schveighoffer wrote: On Thu, 05 Aug 2010 14:41:12 -0400, simendsjo wrote: On 05.08.2010 19:35, Steven Schveighoffer wrote: On Thu, 05 Aug 2010 13:10:44 -0400, simendsjo wrote: (...) (...) Ah, that's rea

Re: Is it bad practice to alter dynamic arrays that have references to them?

2010-08-05 Thread simendsjo
On 05.08.2010 20:50, Steven Schveighoffer wrote: On Thu, 05 Aug 2010 14:41:12 -0400, simendsjo wrote: On 05.08.2010 19:35, Steven Schveighoffer wrote: On Thu, 05 Aug 2010 13:10:44 -0400, simendsjo wrote: (...) (...) Ah, that's really good to know! So I can see if it will reallocate usin

Re: Is it bad practice to alter dynamic arrays that have references to them?

2010-08-05 Thread Steven Schveighoffer
On Thu, 05 Aug 2010 14:41:12 -0400, simendsjo wrote: On 05.08.2010 19:35, Steven Schveighoffer wrote: On Thu, 05 Aug 2010 13:10:44 -0400, simendsjo wrote: (...) One helpful function to note is the capacity function: http://digitalmars.com/d/2.0/phobos/object.html#capacity This gives yo

Re: Is it bad practice to alter dynamic arrays that have references to them?

2010-08-05 Thread simendsjo
On 05.08.2010 19:35, Steven Schveighoffer wrote: On Thu, 05 Aug 2010 13:10:44 -0400, simendsjo wrote: (...) One helpful function to note is the capacity function: http://digitalmars.com/d/2.0/phobos/object.html#capacity This gives you the capacity of the array, or the largest length it can

Re: Is it bad practice to alter dynamic arrays that have references to them?

2010-08-05 Thread Steven Schveighoffer
On Thu, 05 Aug 2010 13:10:44 -0400, simendsjo wrote: Just tell me if this is frowned upon... The reason I posted on SO is because I think it can help making people aware of D. http://stackoverflow.com/questions/3416657/is-it-bad-practice-to-alter-dynamic-arrays-that-have-references-to

Is it bad practice to alter dynamic arrays that have references to them?

2010-08-05 Thread simendsjo
Just tell me if this is frowned upon... The reason I posted on SO is because I think it can help making people aware of D. http://stackoverflow.com/questions/3416657/is-it-bad-practice-to-alter-dynamic-arrays-that-have-references-to-them Let me know if it's not accepted to crosspost like this.