I say we make a refrigerator library; then anyone can define a refrigerator within the library; then we can call the function and apply it to out arbitrary needs.
#include <refrigerator.h>
Wrong. We need refrigeration factory that returns a class called RealRefrigerator that extends AbstractRefrigerator and implementing IRefrigerator, which then must be DI by configuring external XML (bonus points if the xml itself is stored in the database, so no way to reach the config with grep).
The outdated approach of if (food.canSpoil()) { refrigerator.put(food) } was too burdensome and did not conform to all of the best practices.
The outdated approach of if (food.canSpoil()) { refrigerator.put(food) } was too burdensome and did not conform to all of the best practices.