[Issue 9120] Uniform construction for array types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Dec 6 18:45:38 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9120
--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> 2012-12-06 18:45:36 PST ---
(In reply to comment #1)
> What exactly are the syntax changes/additions are you suggesting?
I'm not sure what is should be chosen. This is not an exact syntax proposal,
rather a suggestion to discuss about the issue.
> I think this syntax is better to not support this syntax:
> int[] da2 = int[](1,2,3); // not allowed
I agree that supporting it (stack-allocated dynamic array) is much difficult.
> There are several design problems in the array syntax. Like:
>
> Issue 3849
> Issue 4703
> Issue 7445
>
>
> One maybe even bigger syntax problem is related to mixing fixed-sized arrays
> and dynamic arrays. This is not supported (this means a dynamic array of fixed
> arrays of dynamic arrays):
>
> void main() {
> auto a = new int[][3][](5, 7);
> }
>
>
> Currently the D syntax to create such mixes is incomplete, and I think it's not
> clear enough.
Thanks for presenting related issues.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list