Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: OO versus RDB

Re: OO versus RDB

From: Marshall <marshall.spight_at_gmail.com>
Date: 9 Jul 2006 11:10:08 -0700
Message-ID: <1152468608.748341.255750@b28g2000cwb.googlegroups.com>


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.

It may not be to everyone's taste. But I wouldn't agree that it is a horror. It strikes me that SML is an example of what I describe and it seems to be doing all right for itself.

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
> discipline.

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 - 13:10:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US