--- Comment #3 from 2011-07-30 12:03:14 PDT ---
(In reply to comment #2)
> (In reply to comment #1)
> > Apparently DMD shouldn't accept string[].init at all, e.g. int[].init is a
> > parser error:
> Isn't it better to modify DMD to accept both string[].init and int[].init, and
> return the correct results in both cases?
> Because the alternative idiom to create an empty array is to use 
> cast(int[])[],
> and it's better to avoid casts where possible.

You could also just add a pair of parenthesis:


And (X[]).init returns 'null', not '[]'.

I'm not sure about allowing `S[].prop`. If this is allowed, we should also
allow `S[3].prop` and `S[T].prop` and maybe even `S*.prop`. Maybe let's have a
rejects-valid or enhancement request.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to