[Haskell-cafe] I miss OO

Matthias Görgens matthias.goergens at googlemail.com
Thu Dec 3 20:03:17 EST 2009


> When OO is about constructing a "machine" and talking about objects,
> and FP is about making little algebraic languages, what would C or
> Pascal be like? In these languages, you don't think about objects, but
> you don't think about an algebra either? It's been a very long time
> since I worked with these languages, but as far as I recall, I started
> thinking about data structures and procedures operating on these data
> structures, which sounds a look like making ADTs and
> functions/operations on these... So this sounds odd, because it would
> mean that C and Pascal are in a sense closer to FP than OO is?

You are working with state all the time in C and Pascal.  Perhaps a C
with a garbage collector would be closer to FP, because you could
construct new structures all the time without worrying about memory
leaks.


More information about the Haskell-Cafe mailing list