Community
Participate
Working Groups
This work needs to be completed in Iteration 13. Prioritize it ahead of other enhancements, even if they'll have to be pushed out of the iteration. [The following is the section on Array Declarations from http://wiki.eclipse.org/EDT:EGL_Language_Statements.] Arrays can't be declared with an initial size --------------------------------------------- Arrays can't be declared with an initial size. The size of an array isn't part of its type. That's why in RBD you can declare an int[5] and then assign [1,2,3] to it -- you change its length from 5 to 3. In EDT, all arrays must be declared without an initial size. A size is still allowed on a new expression when you create an array. Here are some example array declarations for EDT: a int[] = new int[3]; a int[] = [1, 2, 3]; a int[]; // This is an array of length zero. a int[]?; // Initially null. a int[]? {}; // This is an array of length zero. Initializing arrays with literals --------------------------------- Array initializers must be efficient. "a int[] = [1, 2, 3];" means make an array of three elements, values 1 then 2 then 3. Do not make a zero-length array, then make an array from the literal, and throw away the original zero-length array. Initializing arrays with set-values blocks ------------------------------------------ A set-values block on an array declaration causes the values within the block to be appended to the array. For example "a int[] { 1, 2, 3 };" results in [1, 2, 3]. The block has a different effect in RBD: it sets elements rather than appending them, so you'd get an index out of bounds exception on the declaration "a int[] { 1, 2, 3 };".
Core changes are complete
Closing.