From: | Don Baccus <dhogaza(at)pacifier(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: leakproof |
Date: | 2012-02-20 05:37:11 |
Message-ID: | 696CBD05-0F58-4AE3-B7AA-B23FBD278C51@pacifier.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Feb 19, 2012, at 7:24 PM, Tom Lane wrote:
> 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":
>> http://en.wikipedia.org/wiki/Pure_function
>> 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.
Yes, I said that myself, perhaps you didn't bother to read closely?
> It's not clear to me whether pure/leakproof functions are meant to be a
> strict subset of immutable functions
Superset, not subset, unless my guessing is wrong. How could "pure" be a subset of "immutable"?
OK, at this point, proponents will explain why ...
But if you're not clear as to what a "leakproof" function is meant to be. then I suggest the definition must be defined very clearly, so everyone understands what it is meant to be.
> , 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.
Sure, let those making the proposal make things clear.
Just speaking as a gadfly who's not posted here for probably close on 10 years …
----
Don Baccus
http://donb.photo.net
http://birdnotes.net
http://openacs.org
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2012-02-20 06:00:06 | Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock) |
Previous Message | Greg Smith | 2012-02-20 05:04:14 | Re: Future of our regular expression code |