4 ms·
Quote: "Armstrong: I think the lack of reusability comes in object-oriented languages, not in functional languages. Because the problem with object- oriented la
by cyrc 6y ago
Quote:
"Armstrong: I think the lack of reusability comes in object-oriented languages, not in functional languages. Because the problem with object- oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.
If you have referentially transparent code, if you have pure functions—all the data comes in its input arguments and everything goes out and leaves no state behind—it’s incredibly reusable. You can just reuse it here, there, and everywhere. When you want to use it in a different project, you just cut and paste this code into your new project."