What    |Removed                     |Added
                 CC|                            |

--- Comment #1 from 2012-04-30 14:19:21 PDT ---
Aesthetically-wise this new literal syntax is not so good, but it solves a
problem, I think it doesn't introduce problems, and it's effective, so it's an
interesting idea:

auto a1 = [1, 2, 3]s;
auto a2 = [1, 2, 3]S;
auto s1 = "abc"s;
auto a3 = ["abc"ds, "def"ds]s; // dchar[3][2] ?

A problem is that "static array" is not a correct term in D, because here foo
is a static array but it's not what you are writing about:

void main() {
    static foo = [1, 2];

So I generally call them fixed-sized arrays. So an alternative is to use a
different letter to denote them (I don't think they get confused with floats):

auto a1 = [1, 2, 3]f;
auto a2 = [1, 2, 3]f;
auto s1 = "abc"f;
auto a3 = ["abc"f, "def"f]f;

The [$] was shown in Issue 481  and elsewhere.

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

Reply via email to