Why do we have transitive const, again?

Peter Alexander peter.alexander.au at gmail.com
Sat Sep 24 18:39:50 PDT 2011


On 25/09/11 12:08 AM, Walter Bright wrote:
> On 9/22/2011 10:36 AM, Peter Alexander wrote:
>> It's mostly for concurrent programming.
>
> It's also for:
>
> 2. purity
> 3. support for true functional programming

Purity and (physical) immutability are separate concepts. Having 
immutable arguments is neither a necessary or sufficient condition for 
being pure.

What do you mean by "true functional programming"? Just pure functional 
programming?

As I explained in my 'Thoughts on Immutability in D' post, physical 
immutability is far too restrictive for functional programming, so I 
would say that immutable in D restricts true functional programming 
rather than supporting it. Supporting functional programming would mean 
supporting logical immutability, because that's all functional programs 
care about.


More information about the Digitalmars-d mailing list