设计模式之各种工厂模式(TypeScript & Rust)
设计模式中带“工厂”两个字的有:简单工厂模式、工厂方法模式、抽象工厂模式。下面用 TypeScript 和 Rust 分别演示一下:
In design patterns, there are three patterns with the word “Factory” in their names
...