3 ms·
The counter point is that this is like arguing that an article about safe knife skills are silly, because you can still just stab yourself?
by taeric 3y ago
The counter point is that this is like arguing that an article about safe knife skills are silly, because you can still just stab yourself?
- kiitos 3y agoI'm not sure how that's comparable. Compile-time type safety is a boolean thing, you either have it or you don't. If you have it, then my example shouldn't compile. But it does compile, so you don't have it.
- taeric 3y agoI think by insisting to view it only as a boolean thing is very limiting. By that measure, are the type safety hints of Python not really giving any type safety? Just give up and go home, as it were? :D I'm sympathetic to the points, I think. But I also don't have a problem with someone pushing for some type safety as long as you avoid actively trying to go against it.
- kiitos 3y ago> By that measure, are the type safety hints of Python not really giving any type safety? If we're talking compile-time, then: yes, absolutely! Type hinting doesn't provide type safety, because type safety isn't a spectrum.
- throwaway46281 3y agoTo me it's pretty clear that safety is a spectrum (e.g. we give cars safety ratings), and therefore so is type safety. Is "type safety" something you saw defined in a PL book or something, which has a more rigid definition to you?
- arp242 3y agoOut of 10 possible errors a compiler can catch 0, 1, 2, 3, etc. up to 10. A compiler that catches 7 errors is more safe than one that catches 4, and one that catches 4 is more safe than one that catches 0.