On 10/15/2010 02:14 PM, Michel Fortin wrote:
On 2010-10-15 04:49:19 -0400, Max Samukha <spam...@d-coding.com> said:
static S s;
ref S foo()
{
return s;
}
Pointers are allowed in SafeD; pointer arithmetic is not. Taking the
address of a static or global variable should be allowed. If this
doesn't compile, you should report it a bug:
static S s;
S* foo()
{
return &s;
}
There's nothing unsafe about taking the address of a static or global
variable since the pointer can never outlive the variable.
Ok, makes sense.