4 ms·
All good points, but I'm having a hard time with this statement: "There is still value in a function declaring that its argument is of type User (and not defen
by TimJYoung 8y ago
All good points, but I'm having a hard time with this statement:
"There is still value in a function declaring that its argument is of type User (and not defensively checking it) even if it is theoretically possible, in the presence of a bug, though unlikely, that the argument is not really a User."
I'm trying to think of a statically-typed language that would allow such a thing, and I can't, so I assume that you're referring to TypeScript here where you have a world where things are "partially-typed" ?