big vague question: OO in FP.
  Home FAQ Contact Sign in
comp.lang.functional only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.functional Profile…
 Up
big vague question: OO in FP.         


Author: raould
Date: Aug 20, 2008 10:34

hi,

Cf. Felleisen's "functional objects" in Scheme and things like OO in
Object-Gopher using monads, it seems like there are a few different
ways one could go about implementing OO concepts/principles (the
definition of which are probably debatable at times, but whatever) in
pure FP. So I wonder if there are guidelines / experiences / rules of
thumb about how those different approaches don't/behave - any
thoughts?

(e.g. does using a monad vs. not using a monad but rather than
mutating doing copy-on-write or whatever and just freely generating
lots of garbage, does that result in some significant performance
difference? but then the flip side might be that the non-monadic
approach is easier to work with in the code itself because you don't
have to carry the monad around every-bloody-where?)

appreciated.
3 Comments
Re: big vague question: OO in FP.         


Author: raould
Date: Aug 20, 2008 10:58

uh, and, i see there are several different implementations of OO in
various FPs, perhaps sort of like there are unfortunately various
versions of classes in javascript. any opinions on which
implementations are the most 'common' for Scheme or MLs? presumably it
would be obviously CLOS for Lisp. i'm guessing it would be something
out of the PLT group for Scheme. and i guess it would be O'Caml for
MLs. and i guess it would be something with monads for Haskell.

but i then wonder how well those relate to the theory espoused in
things like Felleisen's talk, or the OO-Gopher monadic approach. like,
just because Java does OO doesn't mean it is the best way to do OO, so
just because O'Caml has a default approach to OO doesn't mean it is
the best way to do OO.

which brings one back to trying to define what OO should be, actually.
which goes to the quotes Felleisen quotes i.e. reducing and then
eliminating the use of assignment.

no comments
Re: big vague question: OO in FP.         


Author: ssecorp
Date: Aug 23, 2008 16:07

You might want to check this out:

http://www.cs.chalmers.se/~nordland/ohaskell/
no comments
Re: big vague question: OO in FP.         


Author: raould
Date: Aug 25, 2008 18:07


thanks, i'll (re-)read that :-) looks like a monadic-oo, like the
gopher thing.
no comments