Re: Question about initialization

2021-06-04 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 4 June 2021 at 11:27:05 UTC, seany wrote: In my untrained eye, this seems haphazard. One requires the use of the new keyword It doesn't. T[] a; just works. it is an array of length 0.

Question about initialization

2021-06-04 Thread seany via Digitalmars-d-learn
Consider initializing a dictionary or associative array : T[U] AA; For example : double [int] AA; This will be dynamic in size. Now consider initializing a dynamic array : T[] A = new T[] (0); or U[][] B = new U [][] (0,0); This will also be dynamic in size. In my