Skip to main content
9 events
when toggle format what by license comment
Dec 12, 2017 at 8:52 comment added Robbie Dee @JacquesB Yep - would certainly agree with all of that which is another argument against regions. As they fold the code it can hide the true size of a class when in reality, it should (if at all possible) be broken up into a number of classes.
Dec 12, 2017 at 7:17 comment added JacquesB @RobbieDee: A class can be legitimately large i guess, but in that case it should just be in a single file since the whole class is cohesive and tightly coupled. How would you even decide how to split the class into multiple files if there are no natural seams and the whole is cohesive? But if it is not cohesive, then it should be spit up into multiple classes.
Dec 11, 2017 at 16:18 comment added Robbie Dee @JacquesB That is far too simplistic I'm afraid. Large classes happen despite SOLID (which no 2 developers can even agree on never mind tools).
Dec 11, 2017 at 16:16 comment added JacquesB @RobbieDee: That is a bad thing, not a good thing. If a class is too big for one file, split it into logical units and use composition.
Dec 11, 2017 at 15:01 comment added Robbie Dee @JacquesB Have to disagree with you there. They're far less intrusive than regions and allow classes to be broken up among a number of physical files.
Dec 11, 2017 at 9:32 history edited Robbie Dee CC BY-SA 3.0
added 297 characters in body
Dec 11, 2017 at 9:21 comment added JacquesB Using partial classes are at least as bad as regions though.
Dec 11, 2017 at 9:13 comment added Paul Kertscher Thank you very much for your remarks. Personally I do not like partial classes and I think they tend to obfuscate things, rather than making them clearer. Rule of three, is a good point, too, but in my case, I think that readability is a merit on its own right, justifying the paradigm.
Dec 11, 2017 at 9:09 history answered Robbie Dee CC BY-SA 3.0