Proposal: Relax rules for 'pure'
Sclytrack
Sclytrack at fake.com
Thu Sep 23 14:01:49 PDT 2010
???
//weak, strong
int hello (const ref int x)
{
}
int main()
{
immutable int a;
int b;
hello(a); //strong
hello(b); //weak
}
???
---
//impure
impure int hello()
{
//globals
}
---
//impure
impure int hello(shared Myclass a)
{
}
---
//weak
int hello(MyClass a, immutable MyClass b)
{
//noglobals,weak
}
---
//strong
int hello(const int a)
{
//noglobals, weak
}
---
//strong
int hello( immutable MyClass a)
{
//noglobals, weak
}
---
More information about the Digitalmars-d
mailing list