Re: OO versus RDB
Date: 9 Jul 2006 11:10:08 -0700
Tony D wrote:
> Marshall wrote:
> > Daniel Parker wrote:
> > >
> > > I think what I would like to have is a hybrid language, that would
> > > allow me to implement a function with imperative techniques, permitting
> > > mutable data structures for building immutable objects, aka
> > > StringBuffer/String in Java, and a pure functional higher view. Does
> > > that sound sensible? Or stupid?
> > Sounds exactly right. Functional by default, imperative when necessary.
> Sounds like a horror; the best of neither world.
There are disadvantages to insisting on purity in all things. Peter Van Roy does a good job of considering a variety of programming paradigms and comparing their strengths and weaknesses, and he has demonstrated that purely functional programming suffers from reduced modularity compared to imperative; this is beyond the usual, potentialy missing-the-point arguments about performance.
Nonetheless, I think functional programming should be the default choice, because it's the easiest to reason about. I just don't think we should toss out imperative entirely, because it has distinct value.
> > It's also entirely possible (as I think you're implying) to have a language
> > that allowed one to write a function that is "pure" (in that its outputs
> > depend solely on its parameters) but whose implementation was
> > imperative. The functional guys *hate* it when I point this out. :-)
> I don't see why; it's a trivial observation. You can write pure
> functions in Pascal or C, after all. All it takes is a little
My best guess is that to the journeyman, there is substantial benefit to the complete immersion in a particular mindset, and pointing out that that mindset is not the whole story breaks the immersion. I would not expect either an apprentice, nor a true master to be upset by it.
Marshall Received on Sun Jul 09 2006 - 20:10:08 CEST