Needless copying in iterations?

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Mon Sep 17 00:29:44 CEST 2007


On Sun, 16 Sep 2007 09:12:56 -0700, Paul Rubin wrote:

> Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:
>> > What do you mean by Haskell is a dynamic language?  It is statically
>> > and strict typed and the compiler usually knows all the functions. 
>> > No "surprises", no side effects, no duck typing.
>> 
>> Haskell's IO monad (and possibly the do monad?) allows side effects. It
>> would be a pretty poor programming language that didn't allow input or
>> output!
> 
> In a certain theoretical sense, input and output in the IO monad are not
> side effects.

Nevertheless, the authors of the paper listed below say they use the IO 
monad to get mutable objects and therefore side effects.


>> See also http://homepages.cwi.nl/~ralf/OOHaskell/ showing that Haskell
>> can do object-oriented programming, complete with mutable objects and
>> side-effects. Although "duck typing" is listed as a keyword, I couldn't
>> see any reference to it in the paper.
> 
> That describes an OO extension to Haskell, which I suppose is
> interesting, but it's not Haskell.

Built entirely from standard Haskell98. Saying that it isn't Haskell is a 
little like saying that Python plus the Sets module isn't Python anymore.



-- 
Steven.



More information about the Python-list mailing list