On Saturday, 12 January 2013 at 21:12:06 UTC, bearophile wrote:
Maxim Fomin:

I see, but these names are interchangeable. Dlang.org uses "static" (as opposed to dynamic) and tdpl tends to use fixed-size name.

If you call a1 static array, then what name do you give to a2? A static static array?

void main() {
    int[5] a1;
    static int[5] a2;
    __gshared int[5] a3;
}

Bye,
bearophile

Static static array (yes, it is rather dumb). I see no point in selecting more appropriate name among these too if both are correct, both are heavily used in discussions (judging by google search on dlang.org and subdomains - even if I query fixed array, I still receive pages with static name), both are understandable (the only little confusion happens with arrays with static attribute) and there is no language standard which uses some set of terminology.

A case when popular naming is incorrect, is, for example, calling this(this) a struct copy constructor (it happens sometimes) - when it is certainly incorrect, because it is a postblit, and copy constructor is another thing. Even such strictly speaking incorrect naming is understandable and widely used.

Reply via email to