On 28.07.2017 13:04, Nick Treleaven wrote:
On Friday, 21 July 2017 at 13:51:05 UTC, Mike Parker wrote:
DIP 1009 is titled "Improve Contract Usability".
https://github.com/dlang/DIPs/blob/master/DIPs/DIP1009.md
I think the proposed in/out expression contracts should require pure
expressions. In the rare case that impurity is required, the old syntax
can be used. This makes the proposal more useful. Otherwise, the
expression would have to be awkwardly wrapped in `()pure => expr` code
to enforce this (without requiring purity of function body too). It's
too late to require purity for existing contract syntax, but we have an
opportunity here. ...
No, please. Even the fact that 'out' implicitly applies 'const' is
annoying enough, and there is absolutely no good reason to make the two
notations behave differently.