top | item 45029648

(no title)

acoard | 6 months ago

Yes, the type system basically replaces a degree of unit tests. You no longer need unit tests that are basically just type checking. And it's more comprehensive too. It's much easier to have incomplete test coverage without knowing it than an invalid type system. With such a type system, the app will fail to compile. Of course, you still need unit tests for many other things, but the type system does remove a class of them.

Whether typechecking or unit tests is "better" is really a question of taste.

discuss

order

No comments yet.