New answers tagged

5 votes
Accepted

Polymorphism with variable default argument count

The very core of what you're trying to achieve goes against the core principle of polymorphism: interchangeability. The concept of polymorphism is having the ability to write code that handles an ...
Flater's user avatar
  • 49.9k
3 votes

Polymorphism with variable default argument count

At first sight, your object hierarchy breaks the Liskov Substitution Principle (the "L" in SOLID), because I cannot substitute an instance of B for an instance of A due to the differing ...
Philip Kendall's user avatar

Top 50 recent answers are included