Re: Command–query separation principle [re: @mustuse as a function attribute]
rikki cattermole
rikki at cattermole.co.nz
Wed Oct 19 16:37:51 UTC 2022
On 20/10/2022 5:31 AM, mw wrote:
> if a method is marked as @mustuse anywhere in the inheritance tree, that
> method in all the class levels in the whole inheritance tree became
> @mustuse!
Unfortunately people don't compile their program all at once.
So therefore this won't work.
I considered something along these lines, but its ultimately error prone
to try to force an attribute on for a class hierarchy (including not
allowing casts to parents).
More information about the Digitalmars-d
mailing list