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:33:36 EDT 2007

On 5/16/07, Joe Marshall <jmarshall at alum.mit.edu> wrote:
>
> > I want to disagree with part of this.
>
> > Enterprise projects accumulate data, move it around, grovel through it
> > (mining), analyze it, and report on it.  All other things considered
> > equal, enterprises would rather *not* modify data, but instead
> > supersede it and archive the old.


This is true with where I've been to - but I would just add (as you state
below, non consciously) that conceptually IT/business think of keeping audit
trails rather than *not* modifying data, and most of the techniques I've
seen applied are all stateful, whereas you describe below it can be
stateless.

> So where does the functional programming come in?  If you have no
> > primitives that can modify the data, it is *trivial* to avoid all the
> > problems associated with mutation.  (There is the problem of
> > non-determinism that shows up.)
>
> > I was involved in a company developing enterprise-level
> > change-management software.  We used a model where the changes were
> > immutable and composable (like deltas).  We *never* deleted or
> > modified a change, we just accumulated more and more of them.  The
> > code was naturally `macro-functional' in that all large-scale
> > operations were strictly functional.  (At a small scale there were
> > bits of mutation here and there, but that was for efficiency).  It
> > became clear to me that functional programming provides enormous
> > advantages for this project because as complex as things got, you
> > could be pretty sure that the data was safe and secure.


Thanks for sharing - appreciated ;)

After some more digging - it seems that keeping deltas is one of the steps
to make a system functional :)

If you are in a position to share, I am wondering - did you do pure FP style
from top to bottom stack?   Or you use traditional stateful technique for
GUI/persistence and use FP in the middle tier?

Thanks,
yinso
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070516/1d85eaf5/attachment.html>

Posted on the users mailing list.