Re: OO versus RDB

From: Adrian Hey <>
Date: Sun, 09 Jul 2006 14:54:14 +0100
Message-ID: <>

Marshall wrote:
> What I said is true: a function that doesn't read any
> external variables but does write to them will have its
> return value entirely determined by its parameters.

What's wrong about this statement is that such things are not functions. If you want to substitute another word (like "procedure") that would be fine.

> This is just arguing about what the definition of the term "pure" ought
> to be. Not very interesting.

Perhaps you'd find it a little more interesting if it was your job to write an optimising compiler that doesn't break programs.

> Does knowing that a function that only writes to variables but doesn't
> read to them has its return value determined only by its inputs help
> us reason about program behavior? Sure it does.

If your compiler incorrectly transformed your program because you told it some notfunction is a function then I think you might find reasoning about its behaviour rather difficult in practice.


Adrian Hey
Received on Sun Jul 09 2006 - 15:54:14 CEST

Original text of this message