roslynator
roslynator copied to clipboard
RCS1231 can cause perf implications and should probably be avoided in most scenarios when the struct is small
I wouldn't enable this rule, at least not unless all the readonly structs are massive. It seems like the intent is to avoid costs associated with copying of structs, but passing by reference then means that all accesses are indirections, which has its own costs.
This analyzer is not enabled by default.
This analyzer is not enabled by default.
Correct. But is it even safe to enable?
So you are suggesting to simply remove it completely. Ok, but generally it could be a problem because it's a breaking change. Some can then complain that it was removed.
So you are suggesting to simply remove it completely. Ok, but generally it could be a problem because it's a breaking change. Some can then complain that it was removed.
Thank you. Yes, I was proposing that it should be deprecated. I believe you have other deprecated rules already.
Btw, I absolutely love what you have done with this library. Simply put: it is a work of art. Thank you
Btw, I absolutely love what you have done with this library. Simply put: it is a work of art. Thank you
Thank you very much! ❤️
This lint is useful in performance critical code, where it can be manually enabled with a pragma, for example. 👍🏻