Simplification of @trusted
Walter Bright
newshound2 at digitalmars.com
Thu Jun 17 18:18:30 UTC 2021
On 6/17/2021 8:49 AM, Andrei Alexandrescu wrote:
> I think the whole discussion should be redirected toward simplifying `pure`
> instead.
>
> * There are many legitimate reasons to want impure code act as pure.
> * There is no easy recourse as there is for @trusted. All approaches are crazily
> convoluted.
There are ways to do it that are in use in Phobos. It involves doing an unsafe
cast. Doing things like that is why D supports @system code. I'm uncomfortable
making it too easy to defeat the semantics of pure.
More information about the Digitalmars-d
mailing list