Explcit impure function attribute
Quirin Schroll
qs.il.paperinik at gmail.com
Wed Jun 26 17:35:11 UTC 2024
On Monday, 24 June 2024 at 16:47:06 UTC, Richard (Rikki) Andrew
Cattermole wrote:
> On 25/06/2024 4:38 AM, Quirin Schroll wrote:
>> Make `@impure` a compiler-recognized AtAttribute. This has the
>> downside of being asymmetric: `pure` has no `@`, but its
>> inverse `@impure` would have it.
>
> So add it.
>
> Deprecate, then remove without ``@`` in newer editions.
So, you favor (effectively) adding `@impure`, and adding `@pure`
as an alias for `pure`, while deprecating `pure`. Did I
understand that correctly?
> Making all attributes consistent with using ``@`` is a good
> thing.
There are still `throw` and `nothrow`. If I had to lay a bet on
it, I’d say they don’t go anywhere. The value of replacing _them_
with something with `@` is negligible.
More information about the dip.ideas
mailing list