> I thought @safe was orthogonal to pure? If this isn't the case, then yes, free must be disallowed. But then malloc must also be, and any construct which manages its own memory via malloc/free. > From what I remember, pure functions: > 1. cannot access shared or global non-immutable data > 2. cannot call non-pure functions > I don't remember the definition that pure functions must also be @safe. > -Steve
It seems that you're using the word "pure" as a synonym for the noalias and/or restrict __declspec keywords. However, they're different words because they have different meanings. :) If you really mean noalias, then I think we just just call it that and introduce the attribute @noalias? Otherwise, it's a misuse of the term "pure", because D doesn't seem to be really using the term for its correct purpose.