[Issue 481] Letting compiler determine length for fixed-length arrays
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 26 11:37:59 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=481
Andrei Alexandrescu <andrei at metalanguage.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |andrei at metalanguage.com
AssignedTo|nobody at puremagic.com |bugzilla at digitalmars.com
--- Comment #1 from Andrei Alexandrescu <andrei at metalanguage.com> 2010-11-26 11:36:34 PST ---
This enhancement's importance is raised by the fact that array literals have
dynamic length by default, so simply writing
auto a = [1,2,3,4];
won't make a of type int[4].
I think using "[$]" is the most sensible option. The special meaning of
"length" inside array brackets needs to be eliminated anyway, and "[auto]" may
confuse people into thinking it's an associative array.
--
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