On Friday, 17 July 2015 at 14:32:35 UTC, Kagamin wrote:
You don't always have the source for the function, and currently purity needs only the function signature alone. Also a function attribute allows to enforce purity.

If you don't have the source, e.g. it's in a foreign library, then the function is likely heavyweight and you'll cache it yourself. You wouldn't call fib(30) or sin(x) anytime you need it and rely on the compiler to figure out the refusing.

Reply via email to