Generic memory allocation in D

ShadoLight ettienne.gilbert at gmail.com
Tue Mar 5 10:31:41 UTC 2024


On Tuesday, 5 March 2024 at 03:39:41 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
>
> On 05/03/2024 4:29 PM, Walter Bright wrote:
>> On 3/4/2024 12:38 PM, Paul Backus wrote:
>>> For example, you have this:
>>>
...
>>>      // true means failure
>>>      if (f.checkPurity(loc, sc))
>>>          // it's impure
>>>      else
>>>          // it's pure
>> 
>> I know there are inconsistencies in the DMD code base. It 
>> shows the effects of many people working on it over decades.
>> 
>> However, "isPure" asks a question. "checkPurity" does not, and 
>> so it isn't implicit how the logic should go.
>
> s/checkPurity/isFunctionCallableWrtPurity/
>
> A much longer name, but now the purpose is very clear what it 
> does.
>
> True for success, false for failure.


Very clear but wordy...

s/checkPurity/canCallAsPure/    ?



More information about the Digitalmars-d mailing list