Hacker News new | ask | show | jobs
by sklivvz1971 4837 days ago
True, however the solution is ok since passing the test is the only quality you need.

If not, write a new test, make it pass. The naive implementation can be substituted with a different one easily since the tests guarantee correctness.

Generally though, since the "third leg" of TDD is refactoring, this ensures that the proper structures are going to be used in place as soon as they are actually needed.

1 comments

Have you ever tried to apply that in a big enterprise?