On Fri 24 Sep, Claus Reinke wrote:
> >I'm curious. Could you explain exactly what features of Haskell
> >you think render claims of 'pure functionality' false?
>
> The standard example would be IO.
Can you give any other examples?
The issue I'm thinking about is equational reasoning and program
transformation. For a lazy (non-strict) language, transformations
are constrained so that a function definition which is non-strict
in an argument is never transformed into one which is strict in the
same argument. (Or so I believe, please correct me if I'm wrong).
This seems completely contrary to normal equational reasoning (which is
one thing functional languages are supposed to support), where we aren't
so constrained.
So is it unfair to say that as soon as issues like strict vs. non-strict
semantics become an important, the language is no longer purely functional?
Doesn't having to treat _|_ as a value spoil equational reasoning?
That said, the opinion I just expressed is hard to reconcile with
Pieter Koopmans recent message..
> Also in a
> lazy language many optimisations can be done. We can take a look at the
> things done in implementations of C (sorry), SISAL, SAC, etc.
> The high level of abstraction in modern lazy functional languages posses
> both opportunities and challenges to the compiler builders.
I've seen similar comments about lazy languages many times before,
so I must be wrong. Help..
Regards
--
Adrian Hey