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

Paul Backus snarwin at gmail.com
Wed Oct 19 18:25:54 UTC 2022


On Wednesday, 19 October 2022 at 18:16:39 UTC, mw wrote:
> Yes, I know that. But this in my view is still a compiler 
> implementation issue: even in separate dub packages, as long as 
> the compiler visit that package, it need to propagate the 
> attribute to that package's relevant class.

My point is that, even if we assume it is possible to implement, 
it is still a bad idea, because it would introduce implicit 
coupling between modules where no coupling (explicit or implicit) 
previously existed.

I hope I do not have to explain to you why implicit coupling is a 
bad thing in software development.


More information about the Digitalmars-d mailing list