Paper acknowledges positively D's approach to purity (locally pure)

Bruno Medeiros brunodomedeiros+spam at com.gmail
Fri Sep 19 07:01:18 PDT 2008


Bill Baxter wrote:
> On Fri, Sep 19, 2008 at 8:31 PM, Bruno Medeiros
> <brunodomedeiros+spam at com.gmail> wrote:
>> Andrei Alexandrescu wrote:
>>> bearophile wrote:
>>>> Andrei Alexandrescu:
>>>>> It's a great honor and validation to be acknowledged in a paper of
>>>>> such quality and to see D's approach to purity not only mentioned,
>>>>> but in praise terms nonetheless (section 9).
>>>> It seems to contain some comments that are not a praise too:
>>>>
>>>>> While this approach avoids the need to eliminate mutable state and
>>>>> determinism from the global scope, there is a substantial cost in
>>>>> expressivity as it prevents pure functions from making any use of
>>>>> impure functions and methods. The result is essentially of a
>>>>> partition of the program into imperative and purely functional
>>>>> portions, whereas our approach allows pure functions to make full
>>>>> use of the rest of the program, limited only by the references they
>>>>> hold.<
>>> Any paper will mention the disadvantages of related work in the pertinent
>>> section. I'm not worried about that at all. Their system is more expressive
>>> but also considerably more complex. That's not necessarily bad, it's a
>>> different point in tradeoff space.
>>>
>> I haven't yet read the whole paper, haven't had the time yet, but, are we
>> really restricted to the "Functions marked with the pure keyword must have
>> only invariant arguments, can only read invariant global state,
>> and can only call other pure methods." ?
>> Don and I discussed an idea some time ago, called partially pure functions
>> (aka locally pure, aka contextually pure):
>> http://www.digitalmars.com/d/archives/digitalmars/D/Idea_partially_pure_functions_70762.html
>> which would lift some of those restrictions, in a way that is safe and
>> sound, thus allowing more expressiveness (significantly, IMO).
> 
> The funny thing is that D's pure hasn't been implemented yet.  Walter
> added the keyword to the compiler, but I'm pretty sure it still
> doesn't do much of anything useful.  I guess the fine paper was
> referring to the spec?
> 
> --bb

Yeah, it probably refers to the accu-functional.pdf presented by Andrei, 
  although I guess the author could have accessed some less-public 
discussions/talks/documents of Walter's "Inner Circle". :7

-- 
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D


More information about the Digitalmars-d-announce mailing list