[Issue 3356] Make pure functions require immutable parameters

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 5 06:19:39 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3356



--- Comment #7 from Sobirari Muhomori <dfj1esp02 at sneakemail.com> 2009-10-05 06:19:38 PDT ---
For me this compiles:
----
__gshared char[] str;

char fun(in char[] s) pure
{
    return s[0];
}

int main()
{
    char a=fun(str);
    return 0;
}
----

__gshared is not a type modifier.

Sharing feature is young, it's still not clear how well it suits real code,
recently its behavior has changed to imply synchronization, we don't know
whether it will be widely adopted, so I don't think It's a good idea to rely on
it so hardly.

-- 
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