Don Baccus <dhogaza(at)pacifier(dot)com> writes:
> On Feb 19, 2012, at 5:42 PM, Tom Lane wrote:
>> Hmm, "pure" doesn't sound bad to me. Nice and short.
> Technically, "pure" is stronger than "has no side effects":
> Result can't depend on state (for instance, database contents), either. This is the typical definition used in functional programming.
Well, that condition is subsumed in our idea of an immutable function.
It's not clear to me whether pure/leakproof functions are meant to be a
strict subset of immutable functions, but if they are then they meet
this stricter definition. On the other hand, if pure/leakproof functions
don't have to be immutable but only stable, then the stricter definition
corresponds to "pure immutable". That still doesn't sound too bad, as
long as we define our terms clearly in the docs.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Greg Stark||Date: 2012-02-20 03:28:16|
|Subject: Re: Future of our regular expression code|
|Previous:||From: Greg Stark||Date: 2012-02-20 03:17:48|
|Subject: Re: leakproof|