Re: Functional Programming in the Larger or Functional Oriented Software Engineering

"Joe Marshall" <[email protected]> Wed, 28 Mar 2007 10:32:40 -0700
Newsgroups gmane.comp.lang.lightweight
Message-ID <[email protected]>
Yeah, this thread is dead, but I put a star next to it so I would remember to
follow up when I had some time.

In my opinion, `traditional' object-oriented programming (i.e. in the
tradition of
Simula-67) is popular because it wraps imperative programming in a comfy
wrapper.  Look at all the elementary texts on object-oriented programming and
you will see that the very *first* thing introduced is encapsulated state.

It is true that having your state encapsulated is much better than the
alternative
of having your state hanging out all over the place.  When an object is modified
in a surprising way, at least you know where to find the offending code.

Of course it is better to be rid of the state altogether, but that
requires learning
a new paradigm.

What is really nasty about the current OOP trend is that it actively encourages
the use of state.  The standard container libraries that come with
these languages
have tons of methods for modifying, adding, deleting, iterating over things in a
stateful way, and almost no support for doing things functionally.


-- 
~jrm