Array and Object Literal Types

2007-08-17 Thread Garrett Smith
It would be nice to have Array literal syntax declare it's ArrayType before the declaration of the array. For example: 1. var x : ArrayString = [ foo, bar, document.title, getAnotherString() ]; 2. var x = [ foo, bar, document.title, getAnotherString() ] : String; example 1 is more clear to

Re: Array and Object Literal Types

2007-08-17 Thread Brendan Eich
On Aug 17, 2007, at 2:47 PM, Garrett Smith wrote: It would be nice to have Array literal syntax declare it's ArrayType before the declaration of the array. For example: 1. var x : ArrayString = [ foo, bar, document.title, getAnotherString() ]; Array is not a parameterized type. If it