DEV Community

Discussion on: I don't need types

Collapse
 
evanoman profile image
Evan Oman • Edited

Thank you for sharing your experience!

I think a lot of people get caught up on the tests vs types discussion by focusing on an XOR relationship between the two.

Why not use both? Projects using static typed language still need tests and well tested projects in a dynamically typed language could still benefit from types.

Collapse
 
quii profile image
Chris James

Yeah I've never subscribed to the tests vs types thing either.

Certainly you'll need more tests in a dynamic language (integration between units in particular) but tests are still valuable in static languages. I've spent most of my career working with Scala which has a very expressive type system and i've never thought i wouldnt need tests.

This is forgetting of course that TDD in particular is not just about correctness.

Collapse
 
dmerejkowsky profile image
Dimitri Merejkowsky

That's an excellent summary :)