On Sun, 01 Mar 2009 05:30:28 +1300, Sean Kelly <[email protected]>
wrote:
Jason House wrote:
Are there any good reasons to allow built in arrays to be resizable?
There's already plenty of empirical evidence that building arrays by
appending is incredibly slow.
There are also bugs in bugzilla where resizing arrays after assigning
one array to another violates type safety. Those bugs can be solved by
always reallocatimg arrays when resizing, but that makes performance
even worse...
While not much of an argument, C# also prevents array resizing.
Is it time to rely on standard libraries for data structures and let
built in arrays be fixed length? It's a breaking change...
C has dynamic arrays now. If D got rid of them I might just cry.
How do you mean? Are you talking about something like this:
void someFunc(int s)
{
int ar[s];
}