Magnus Therning <[EMAIL PROTECTED]> writes:

> Now, correct me if I'm wrong, but you see a "natural" ordering in your
> haskell expressions, right?

Right.

> However the compiler/interpreter
> has to choose a sequence in order to arrive at a result, since that's
> how today's computers work.  (Choosing well can be seen as optimisation
> :-)

Right.

Ah, I may see my confusion then - I do see a natural ordering in my
Haskell expressions, and indeed evaluation order could be different so
long as the end result is the same, but I don't find that different to
imperative languages - I would expect modern compilers to reorder
statements if they can get better results out of it without affecting
the answer. (E.g., if I specify a set of assignments where some
reordering leaves the answers unchanged, but clusters uses of values
better so that the dataflow is such that they can stay in registers, I'd
expect the compiler to go ahead - so even where I do specify evaluation
order in C or whatever, I don't particularly expect the compiler to
respect that in cases where I won't notice that it didn't.)

-- Mark

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to