4 ms·
> Why not a type for even numbers? Odd, prime, not-prime, etc? Why not indeed? See my other comment https://news.ycombinator.com/item?id=28214776 https://news.
by WalterBright 5y ago
> Why not a type for even numbers? Odd, prime, not-prime, etc?
Why not indeed? See my other comment https://news.ycombinator.com/item?id=28214776 https://news.ycombinator.com/item?id=28214776 about how to create such types.
- taeric 5y agoI meant that line as a bit of a tease to other tricks. And it isn't like this isn't done often. Take the lowly format string in c languages. With the requirement that the format string has to be static, it is common to fail builds if you give it a bad format string or supply the wrong number of arguments.