News for hackers. Stuff that matters.
Re:Ask HN: Concepts that clicked only years after you first ... by codethief on Sunday January 01, 2023 @09:26PM (#34213530)
> Of course it's not necessarily a full replacement

I'd actually say: Not in the slightest. A type system just rules out illegal input values[0] but it won't ensure that your business logic is correct.

And even that[0] is not entirely correct because, most of the time, a type system just rules out some illegal values but not all of them, because it cannot represent all possible constraints. Gary Bernhardt discussed this whole type checking vs. tests debate at length here: https://www.destroyallsoftware.com/talks/ideology

There are no comments on this comment yet.