Simplification of @trusted

rikki cattermole rikki at cattermole.co.nz
Thu Jun 17 14:04:30 UTC 2021


On 18/06/2021 1:54 AM, ag0aep6g wrote:
>> Ok, but it is not _realistic_ to think that D users will not write 
>> code that they think is _good enough_ for their purpose. Since there 
>> is no way to verify that they  adhere to idealistic principles, it 
>> won't happen.
> 
> I think there's almost a consensus that @trusted isn't quite good 
> enough, exactly because no one can be bothered to use it as intended. 
> That's why the incremental improvements mentioned above are being worked 
> on. I don't think anyone is working on redesigning (or reinterpreting) 
> the whole thing from the ground up. And I would expect strong push-back 
> from Walter if someone tried.

What might be a good thing to have is make the compiler able to produce 
an audit report for @trusted code. Along with a list of all @trusted 
symbols in source code (not generated).

You can diff the list to see what symbols are added, and ensure somebody 
audits it at PR time with the help of the CI.


More information about the Digitalmars-d mailing list