Command–query separation principle [re: @mustuse as a function attribute]
mw
mingwu at gmail.com
Wed Oct 19 08:35:21 UTC 2022
On Wednesday, 19 October 2022 at 08:29:20 UTC, mw wrote:
> OK, I saw what they are talking about.
>
>
> Basically, in Eiffel, all query @mustuse.
>
> Here in D @mustuse is an remedy add-on, which can be specified
> by the programmers in the middle of the inheritance tree, the
> question is what if the pointers got casted either upwards or
> downwards?
>
> (It's too late for me here today.)
>
My gut feeling is: make it simple, if a method is marked as
@mustuse anywhere in the inheritance tree, that method in all the
class levels of the inheritance tree became @mustuse!
More information about the Digitalmars-d
mailing list