Explicitly writing default empty constructor
Does it make sense to write default constructor when it has no arguments, empty body and no other constructors exist?
Where should an object in CQRS+ES be fully initialized: in the constructor, or when applying the first event?
There appears to be widespread agreement in the OOP community that the class constructor should not leave an object partly or even fully uninitialized.
Where should an object in CQRS+ES be fully initialized: in the constructor, or when applying the first event?
There appears to be widespread agreement in the OOP community that the class constructor should not leave an object partly or even fully uninitialized.
Where should an object in CQRS+ES be fully initialized: in the constructor, or when applying the first event?
There appears to be widespread agreement in the OOP community that the class constructor should not leave an object partly or even fully uninitialized.
Matching the superclass’s constructor’s parameter list, is treating a null default value as a non-null value within a constructor a violation of LSP? [duplicate]
This question already has answers here: Liskov substitution and abstract classes / strategy pattern (2 answers) Closed 9 years ago. I kind of ran into this when messing around with FlashPunk, and I’m going to use it as an example. Essentially the main sprite class is pretty much class Entity. Entity’s constructor has four parameters, […]
Matching the superclass’s constructor’s parameter list, is treating a null default value as a non-null value within a constructor a violation of LSP? [duplicate]
This question already has answers here: Liskov substitution and abstract classes / strategy pattern (2 answers) Closed 9 years ago. I kind of ran into this when messing around with FlashPunk, and I’m going to use it as an example. Essentially the main sprite class is pretty much class Entity. Entity’s constructor has four parameters, […]
Matching the superclass’s constructor’s parameter list, is treating a null default value as a non-null value within a constructor a violation of LSP? [duplicate]
This question already has answers here: Liskov substitution and abstract classes / strategy pattern (2 answers) Closed 9 years ago. I kind of ran into this when messing around with FlashPunk, and I’m going to use it as an example. Essentially the main sprite class is pretty much class Entity. Entity’s constructor has four parameters, […]
Wrapping constructor arguments
Given a base class with around 25 or so subclasses, I have found that adding an argument to the base constructor is painful.
Wrapping constructor arguments
Given a base class with around 25 or so subclasses, I have found that adding an argument to the base constructor is painful.
Decoupling when constructors have non-contractual parameters
By non-contractual parameters, I mean parameters that are not interfaces or service dependencies, something like class Person(string name)
.