What exactly does "@safe" mean?

monarch_dodra monarchdodra at gmail.com
Sat Jun 1 15:04:18 PDT 2013


On Saturday, 1 June 2013 at 21:45:18 UTC, Andrei Alexandrescu 
wrote:
> On 6/1/13 3:59 PM, monarch_dodra wrote:
>> Yeah, overall, I'm confused as to what "@safe" means from an 
>> interface
>> point of view :(
>
> If you call the function from a program with memory integrity 
> and it returns, it hasn't compromised the memory integrity of 
> that program.
>
> Homework: define memory integrity :o).
>
>
> Andrei

OK. In a word, I guess that makes sense. I'll stick to that 
standard.

But there is still the "emplace" question: When I call "emplace" 
on a pointer to a built object, is does the program still have 
memory integrity? At the end of the call, was it emplace that 
compromised it? Was it the exact instance the "call was 
initialized"?


More information about the Digitalmars-d mailing list