Re: leakproof

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: leakproof
Дата
Msg-id 17828.1329708284@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: leakproof  (Don Baccus <dhogaza@pacifier.com>)
Ответы Re: leakproof
Re: leakproof
Список pgsql-hackers
Don Baccus <dhogaza@pacifier.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
functionalprogramming.
 

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: leakproof
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Future of our regular expression code