On Monday, 8 December 2014 at 20:42:49 UTC, deadalnix wrote:

No I mean the reverse. Let's make it with const as it is better
understood by everybody, and at the end we discuss grammar, so it
doesn't matter.

const A delegate() a; // A mutable delegate that return a const(A)
A const delegate() a; // A const delegate with a const context
(context is transitive) and return an A.
A delegate() const a; // A mutable delegate with a const context
that return an A.

You have inherently 3 things to qualify when it come to delegate:
the return type, the context and the delegate itself.

Yes, that create an inconsistency in the grammar. On the other
hand, that allow for much more consistency in other aspect of the
language. If consistency is a measure, the proposal is a winner.

Relevant: http://wiki.dlang.org/DIP30

+1!
---
Paolo

Reply via email to