Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

As with many programming languages, you can use phantom types to prevent this sort of thing, and in fact, that's exactly what's happening but they make it sound extra silly when they throw away the safety wrapper. That's why some of these have weird statements like the third coordinate of <something that doesn't obviously have coordinates>. Some of these amount to, "if you have 3 apples and 5 oranges, and you just take the raw numbers and add them, you get 8," and then layer it with an extra level of obfuscation, like "if you have the second prime number apples, and the third prime number oranges, and take the raw numbers and add them, you get the first prime number to the power of the second prime number."
 help



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: