@trusted attribute should be replaced with @trusted blocks

ag0aep6g anonymous at example.com
Wed Jan 15 23:58:22 UTC 2020


On Wednesday, 15 January 2020 at 23:24:38 UTC, IGotD- wrote:
> @safe is a subset of D that guarantees no memory corruption.

Not quite. @safe is a subset of D that guarantees no memory 
corruption, as long as people write only correct @trusted code 
(and there might be more restrictions). This weaker definition is 
being used because the strong one is considered impractical.

There might be text in the documentation that suggests the 
stronger definition, but that is not going to take precedence. 
The weaker one is widely accepted as more useful. If anything, a 
conflict would surely be resolved by changing the documentation.


More information about the Digitalmars-d mailing list