Can pure functions throw exceptions on its arguments?
You can throw exceptions for whatever reasons from a function marked pure:
void foo() pure { throw new Exception("nope"); } void main() { foo(); }
Also, how can it perform impure operations?
Well, the point of pure is to restrict you from doing that. Is there something specific you're trying to do?