Proposal: struct and array literal syntax

Boris Wang nano.kago at hotmail.com
Fri Jun 23 01:52:17 PDT 2006


"Andrei Khropov" <andkhropov at nospam_mtu-net.ru> дÈëÏûÏ¢ÐÂÎÅ:e7b7fb$277d$1 at digitaldaemon.com...
> Derek Parnell wrote:
>
>> Now a 'rectangular' array ...
>>
>>   int[][]![
>>       int[]![1,2,3,4],
>>       int[]![5,6,7,8],
>>       int[]![9,0,1,2],
>>       int[]![3,4,5,6],
>>     ]
>>
>> Hmmm ... appears to do okay.
> Well, in the last case inner int[]! s appear to be a syntactic overhead.
>
> I'm still waiting for better handling of multidimensional rectangular 
> arrays
> (not less effective "jagged").
>
> -- 
> AKhropov
>

May be:

 int[][]![
     ![1,2,3,4],
     ![5,6,7,8],
     ![9,0,1,2],
     ![3,4,5,6],
 ]

the type of ![1,2,3,4] can be inferred. 





More information about the Digitalmars-d mailing list