• FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    1 年前

    Yeah most uses of the factory pattern are unnecessary and it’s mild code smell IMO. If your factory only returns one type you should definitely just use that type’s constructor.