函数式编程 > 面向对象编程
原文英文,约200词,阅读约需1分钟。发表于: 。I'm a fan of Object Oriented programming (OOP), but don't use it much. The challenge is that nearly always the state and functionality gets mashed together, so it's hard to modify either one....
我喜欢面向对象编程(OOP),但使用不多。OOP常常将状态和功能混合,修改困难。相比之下,函数式编程(FP)更易于适应和测试。有时我会创建只包含静态方法的“类”,作为相关函数的小库。Rich Hickey的演讲《简单就是容易》帮助我更好地理解这些概念。