Simplification of @trusted
Sönke Ludwig
sludwig at outerproduct.org
Wed Jun 16 13:09:53 UTC 2021
Am 16.06.2021 um 13:38 schrieb RazvanN:
> Currently, @trusted applies only to functions. This is most of the times
> a pain when you want trusted code blocks inside functions. Why not
> simplify it a bit by using trusted scope blocks?
Yes, please! There are 800 of these in vibe.d alone. There has also been
an issue where the delegate workaround was erroneously flagged as a heap
delegate, causing considerable GC memory load.
`@trusted` *should* probably not even be available for functions (of
course it is not a desirable breaking change to disallow that now, though).
More information about the Digitalmars-d
mailing list