On Wed, 23 Feb 2011 12:01:15 -0500, Andrei Alexandrescu
<seewebsiteforem...@erdani.org> wrote:
On 2/23/11 10:52 AM, Steven Schveighoffer wrote:
Why? We have both attributes, why not just require "@safe pure" if you
want @safe pure functions?
Because a pure unsafe function is useless.
Just because a function is not marked @safe does not mean it is unsafe.
It just means you can do things the compiler cannot verify are safe, but
that you know are actually safe. I showed you earlier an example of a
safe pure function that uses malloc and free.
Programmers are allowed to make conceptually safe functions which are not
marked as @safe, why not the same for pure functions?
-Steve