Skip to content
SP StackPractices

Tag: polymorphism

1 resource tagged with "polymorphism" on StackPractices.

Swap Algorithms at Runtime with the Strategy Pattern

How to encapsulate interchangeable algorithms and behaviors using the strategy pattern with dependency injection, function pointers, and lambda strategies in Java, TypeScript, and Python.