Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> In practice very few projects can benefit from the "Factory pattern"

The factory pattern in C#:

    public IMeasuringDevice CreateMeasuringDevice(Func<IUnitConverter> unitConverterFactory)
In TypeScript:

    function createMeasuringDevice(unitConverterFactory: () => UnitConverter): MeasuringDevice
Very few projects can benefit from this!?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: