Thinking in FP vs OOP for large scale apps => Re: [plt-scheme] Imperative programming : missing the flow

From: YC (yinso.chen at gmail.com)
Date: Wed May 16 15:20:47 EDT 2007

> Please find someone who has seen Chet Murthy's invited talk at
> POPL 2007 and on how he seriously simplified and improved a
> huge enterprise application with an FP approach and language.
> He increased performance so much that he saved his customer
> an order of magnitude of hardware, which is substantial when
> you think of several warehouses full of machines.

I found his presentation online - I am definitely intrigued to figure out
more on this ;)

> YC, over the past semester I have written a small (6+ Kloc)
> > distributed game with a graphical display (but no real interface). I
> > wrote it in the FP style I advocated in my ECOOP keynote in 2004.


Are you refering to this doc on your site?
http://www.ccs.neu.edu/home/matthias/Presentations/ecoop2004.pdf

It is cool!  The functional technique that you use with OO is quite
interesting indeed.  Some of the pictures without words are a bit hard to
grok - I found your keynote gzip but not sure what is the .apxl extension -
would the keynote gzip have some of the text content?

> An intern from ENS and Sam TH have already ported the code to Typed
> > Scheme (in one day). We're hoping to report on that experience in a
> > paper. As others have pointed out 'types vs dynamically safe' and
> > 'oop vs fp' are distinct questions.


Yup :)

> My experience has been terrific. I spent one real workday so far and
> > the project is basically up and running. The interface-oriented style
> > of class-based programming has several advantages over plain modular
> > programming. I intend to report more details in an essay/paper one
> > day. (Sneak preview: inheritance plays almost no role.)
>
> > Eventually I intend to rewrite the code into the new unit-based
> > style. I conjecture that units and classes based code bases will be
> > nearly isomorphic.
>
> > Last but not least: I have used pure forms of FP and applicative OOP
> > here. Some other modules use set!-y style, and the conversion was
> > identical.


Thanks for recounting your experience.  Very appreciated.

I think the biggest brain twister for me with pure FP is statelessness.  I
just found stream as the a way to model state changes explicitly in the
system to remove side effects (and of course Haskell & its monads are still
escaping me), and while I grok the concept it's still a bit hard to commit
to an implementation.

I will dig further in HtDP for exercises - thanks,
yinso
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070516/bc080f27/attachment.html>

Posted on the users mailing list.