If you could make any changes to D, what would they look like?

Dukc ajieskola at gmail.com
Thu Oct 28 23:05:04 UTC 2021

On Thursday, 28 October 2021 at 21:48:09 UTC, max haughton wrote:
>> No that's slightly different. The linked issue deals with 
>> strongly `pure` functions. I'm dreaming about letting the 
>> compiler to optimise based on weak `pure` too - not currently 
>> allowed if I read the spec right, but could be without this 
>> issue (I think?).
> Is this worth caring about?

You decide. Without that, the weak `pure` can still be used 
inside strongly pure functions, but is otherwise useless for 

> Do the backend a that actually matter not already perform this 
> analysis as part of their IPA?

If the function body is available and not too complicated, 
probably. But with `pure` it's possible for a compiler to 
optimise based on the signature alone.

I don't personally care that much about having a super-optimising 
compiler, but I still wish that our attributes provide as much 
info as possible for any analysis program.

More information about the Digitalmars-d mailing list