|
|
|
|
|
by jcora
2638 days ago
|
|
You are really not getting this distinction, I'm not sure how much clearer I can make it. You can evaluate `putStrLn "hello"` a billion times without anything "happening" at all, because it is just a function. Maybe it has to be made clear that purity is a property of languages and language constructs, and how you can reason about them, if you model a physical system mathematically of course you will have a pure formal description of it, but that's not the domain where this concept applies. Even then, it can only be said of your _model_ that it is pure, and the point of pure languages is to allow for this mode of reasoning. When you call a C function, you cannot know whether equational reasoning holds, whereas you can be sure when you're using a pure language. Therefore, when you're working on a project that is 100% in say Idris, you are in fact making a totally pure program. You could make an Idris compiler that inserts random perturbations in various functions, or you could look at crashes etc., but that is not where the concept of purity applies, it's a category error to think it does. |
|
When I actually get output that says "hello", that isn't pure, is it? And there is some way for me to actually produce that output, isn't there? It may not be "evaluating putStrLn", but it's something.
And if that's all true, then rujuladanh is essentially correct: You're being pedantic in a way that misses the main point.