Re:Are dynamic languages going to replace static languages? ...
by ratww on Wednesday August 04, 2021 @12:59PM
(#28063417)
Depends on how you write your code.
If your functions have lots of hidden dependencies and side-effects, it’s hard to test.
If you split concerns properly and keep your glue/IO code separated from the decision-making/business-rules/logic, mocking is quite trivial, and there are advantages other than just testability.
If your functions have lots of hidden dependencies and side-effects, it’s hard to test.
If you split concerns properly and keep your glue/IO code separated from the decision-making/business-rules/logic, mocking is quite trivial, and there are advantages other than just testability.
Check out this talk to see examples of that in action: https://www.destroyallsoftware.com/talks/boundaries