Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
teo_zero
· 3y ago · 0 comments
If foo() happily accepts a number instead of a Prime, then this is not robust enough: you can always forget the check!
It's the compiler that should warn you about a wrong type.
Comments
[–]
PartiallyTyped
3y ago
Ah, you are right, i was under the impression that the compiler made it more specific.
My bad.