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.

Reply via email to