logoalt Hacker News

pmontrayesterday at 5:37 PM3 repliesview on HN

Good luck using static typing to model many real world unit tests for the programming languages people use most. I start with an easy example: those records should be sorted by date of birth. We can move on to more complicated scenarios.


Replies

jodrellblankyesterday at 8:28 PM

> "records should be sorted by date of birth."

What's wrong with C#'s:

    System.Collections.Generic.SortedList<DoBDateTime, PersonRecord>

?
Jaxanyesterday at 5:52 PM

The comment didn’t claim that types are a stand in for tests either! IMO, they are orthogonal.

show 1 reply
paulddraperyesterday at 6:08 PM

No one claims that types are a stand in for all unit tests.

They stand in for the banal unit tests.