[Haskell-cafe] I miss OO

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Thu Dec 3 21:33:15 EST 2009

On Dec 3, 2009, at 20:03 , Matthias Görgens wrote:
>> 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.

A Boehm GC library for C has been around for years.  Nevertheless, I  
wouldn't call C-with-Boehm "functional programming".

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20091203/2036aba5/PGP.bin

More information about the Haskell-Cafe mailing list