Hacker News new | ask | show | jobs
by awinder 4025 days ago
Honest question: how do you validate business rules are adhered to without defect in FRP and how does FRP differ from OOP in that regard?
2 comments

Stolen from Wikipedia: "FRP is a paradigm using the building blocks of functional programming." I doubt OP was referring to FRP.

In any case: in a functional programming language, you'd just unit test the building blocks (functions). Assuming every function is pure and total, these unit tests should be succinct and mirror your business logic quite closely.

Actually the OP uses Clojure in his project.
Not with unity tests, that's a certainty. Unity tests do not test business logic.

Yes, when people say that no tests are needed, it's hyperbolic. Tests are always needed, but you do not need to test all corner cases, just the ones created by business logic.