• Kache@lemm.ee
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    25 days ago

    IMO factory functions are totally fine – I hesitate to even give them a special name b/c functions that can return an object are not special.

    However I think good use cases for Factory classes (and long-lived stateful instances of) are scarce, often being better served using other constructs.