Relative Content

Tag Archive for solid

Trade-offs between applying the open-closed principle and type safety

There’s lots of questions about the open-closed principle here, but none that I found satisfied this particular problem. At $job, I’m teaching my team Rust, but I believe the nature of this question extends beyond Rust. We have a training problem that we use to kick the tires on new ideas, because we can all imagine a few canonical solutions to it. One small aspect of this problem is that an embedded target needs to communicate with a host PC over a serial port. Naturally, I used Rust’s famous enums to describe the protocol (domain terms have been erased from the example):

Single responsibility vs procedural programming [duplicate]

This question already has answers here: Clarify the Single Responsibility Principle (14 answers) Closed 9 years ago. Single responsibility (from SOLID) is like making me create classes with only one public method. But if it’s so, it would be possible use static methods, and go back to procedural programming. What’s the difference? object-oriented solid single-responsibility […]

Single responsibility vs procedural programming [duplicate]

This question already has answers here: Clarify the Single Responsibility Principle (14 answers) Closed 9 years ago. Single responsibility (from SOLID) is like making me create classes with only one public method. But if it’s so, it would be possible use static methods, and go back to procedural programming. What’s the difference? object-oriented solid single-responsibility […]

Single responsibility vs procedural programming [duplicate]

This question already has answers here: Clarify the Single Responsibility Principle (14 answers) Closed 9 years ago. Single responsibility (from SOLID) is like making me create classes with only one public method. But if it’s so, it would be possible use static methods, and go back to procedural programming. What’s the difference? object-oriented solid single-responsibility […]