通过过渡到函数式编程来提高可测试性和重用性
Improving Testability and Reuse by Transitioning to Functional Programming
摘要:
声明式风格(如函数式编程(FP))正在迅速地在其命令式兄弟(包括过程式和面向对象编程)中占据一席之地。这种转变是微妙的,因为它发生在多范式程序设计语言(如JavaScript)的上下文中。FP更适合测试驱动开发(TDD)等现代流程,以及大规模并行、基于云计算等架构。本文描述了从命令式到FP的转变的技术细节,以及对软件质量管理的影响,特别是重用和可测试性。
英文摘要:
Declarative styles such as functional programming (FP) are rapidly gaining ground on their imperative cousins, including procedural and object-oriented programming. The shift is subtle because it is happening within the context of multiparadigm programming languages such as JavaScript. FP is better suited to modern processes like test-driven development (TDD), and architectures like massively parallel, cloud-based computing. This article describes the technical details that characterize the shift from imperative to FP and implications for software quality management, particularly reuse and testability.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。