This is a controversial topic in programming languages. I realized that many new languages are designed with functional programming, e.g. Rust, Golang. Why? What is the difference from traditional OOP design.
Examples
TypeScript GO
Why is tsc
rewritten in golang?
https://github.com/microsoft/typescript-go
写好function后可以完全不关心其他的代码,因为互相之间不会有干扰,不存在side effect。不仅写的快,测得也快,边写边侧。