Simplification of @trusted

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Jun 16 15:37:22 UTC 2021


On Wed, Jun 16, 2021 at 01:00:07PM +0000, kinke via Digitalmars-d wrote:
> On Wednesday, 16 June 2021 at 11:38:54 UTC, RazvanN wrote:
> > What do you think?
> 
> Absolutely love it, I've wanted this for ages, similar to C# `unsafe
> {}` blocks. I absolutely hate the trusted lambdas 'idiom'.

This isn't the first time it was suggested.  Way back when, it was
brought up and rejected because Walter thought that @trusted blocks
should be discouraged, and therefore should be ugly to write.  It was
extensively argued, but Walter preferred the "trusted lambda idiom",
precisely because it was ugly, required effort to write, and therefore
deters casual (ab)uses of @trusted.


T

-- 
What is Matter, what is Mind? Never Mind, it doesn't Matter.


More information about the Digitalmars-d mailing list