[Haskell-beginners] Re: Applicability of FP unchanging things to real world changing things

Stephen Tetley stephen.tetley at gmail.com
Tue Dec 15 06:24:37 EST 2009

2009/12/15 Glurk <streborg at hotmail.com>:

> So, I'm just thinking that in the real world, we typically do think of
> changing objects, so a model which also has this property, can help in
> understanding.

Ah but Glurk, a model that has this property can often greatly
_hinder_ understanding:
Its well know in OO circles that state change is problematic for
'modelling' - vis the damage done to a circle or square object by the
otherwise standard operation of a non-uniform scale, where the circle
is obliged to become an ellipse, the square an oblong. [1]

Typestate object oriented languages exist where one can migrate e.g a
closed file object into an open file and back again, but are somewhat
off the beaten path, seemingly doomed to be curios every once in a
while at POPL, OOPSLA...

Best wishes


[1] http://en.wikipedia.org/wiki/Circle-ellipse_problem
[2] http://www.cs.cmu.edu/~aldrich/papers/onward2009-state.pdf

More information about the Beginners mailing list