Command–query separation principle [re: @mustuse as a function attribute]

Mike Parker aldacron at gmail.com
Wed Oct 19 07:28:21 UTC 2022


On Wednesday, 19 October 2022 at 04:52:31 UTC, mw wrote:

> @mustuse as a function attribute was in the original version of 
> the DIP. It was vetoed by Walter. Thus, only the type attribute 
> remains in the accepted version.
>

Please include the entire context that I posted earliar from the 
summary of the formal assessment here:

https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1038.md#formal-assessment

Walter didn't just willy-nilly "veto" the attribute on functions. 
He accepted the proposal with three requests for enhancement, one 
of which I summarized as:

> develop rules for handling covariance and contravariance when 
> applied to functions.

Paul opted instead to punt on this and restrict the attribute to 
types, which was a perfectly reasonable thing to do. Note that 
the DIP was still accepted.

Walter doesn't *not* want the attribute to apply to functions. 
It's just that he wants it to be more fully specified. He and 
Paul had a series of emails on this and other aspects of the DIP.

If anyone is willing to take this and flesh it out further so 
that it meets Walter's criteria for applying to functions, please 
let me know. It's pretty much guaranteed to be approved.


More information about the Digitalmars-d mailing list