What is a pure function?

One answer is that the user shouldn’t be responsible for asserting purity. That should be the compiler’s job. Users are really bad at this type of thing. They will put a print in and not remove the pure. They will forget it in places where it should be annotated, etc.