Re: OO versus RDB
Date: 9 Jul 2006 09:22:06 -0700
> 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'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.
> There might even be type system support for distinguishing pure functions.
To what end ? And even then, I doubt it; this would be a job for some kind of abstract interpretation, which, since you've allowed side effects and referentially opaque subroutines, becomes a non-trivial pursuit. Received on Sun Jul 09 2006 - 18:22:06 CEST