Think Programming(2) - OO VS FP
Note: The main content is first written in Chinese, with the English translation following below.
Chinese Version
OO VS FP
接下来我想讨论一下 OO 和 FP. 先说结论:
只使用任何一个都不能写出能快速交付, 同时又容易维护的代码工程.
我们需要结合这两种编程模式的优点, 谨慎使用这些思想工具, 尤其是OO, 如果过度使用OO的一些编程思想, 例如: 继承, 代码会很快变得难以理解和维护.
未完待续…
English version
OO VS FP
Now I want to talk briefly about Object-Oriented (OO) and Functional Programming (FP). My conclusion is:
using either approach alone won’t help you write code that’s both quick to deliver and easy to maintain.