[Haskell-cafe] On the purity of Haskell
Никитин Лев
leon.v.nikitin at pravmail.ru
Thu Dec 29 18:09:20 CET 2011
29.12.2011, 23:55, "Gregg Reynolds" <dev at mobileink.com>:
> Haskell does not and cannot know what the result of an IO action is, because it's outside the scope of the language (and computation). (The "Int" part of "IO Int" refers to the input, not the output; it's just a sort of type annotation.) It's not even a computation, unless you want to take a broad view and include oracles, interaction, etc. in your definition of computation.
>
Yes, purity is a property of language. It's matter to thinking of algorithms and expressing these algorithms in computer language. It's not matter (in general) for programmers what PC would be do with IO computation. We want to have an expressive instrument and want to have a robust language. We want to have a language that can give us possibility to express our algorithms in clear, easy to understand, proven ways. And purity property of language is about it.
It's not interesting to programmers what means purity to compile or to runtime system.
It maybe interesting if we can realize effective compiler form language with purity property to machine codes. But haskell shows us than it's possible. Isn't it?
-------
PS sorry for my not good French
More information about the Haskell-Cafe
mailing list