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] [email protected]
system administrator [openafs,heimdal,too many hats] [email protected]
electrical and computer engineering, carnegie mellon university    KF8NH


Attachment: PGP.sig
Description: This is a digitally signed message part

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

Reply via email to