Types 'n' Testing

I know and love this talk and have watched it several times (along with Gary’s other criminally under-rated talks that aren’t the “WAT”).

I have nothing against statically typed languages and I don’t personally believe that testing replaces types… at least not testing alone, but I really didn’t want to turn this thread into a debate :grimacing: I’ve played around with typed languages but have no professional experience with them and I haven’t even built a fleshed-out toy application with one. My questioned stemmed from the extreme stance that is taken online around static typing. In this particular case, I was talking about how I’ve read the phrase: “Static types replace a whole class of tests!” so many times online but examples of are never given (I never bothered asking because I didn’t want to get involved in a static typing debate on the internet). I was always skeptical and then I watched José’s talk where he said he doesn’t agree with this statement, so I was like, “Yay! Ok, so what are these tests people were writing that they stopped writing once they had types?”

I definitely see how it benefits LSPs. I guess it’s a “weird flex” as the kids say, but I don’t use them (though I love Mitch’s work in general).