News for hackers. Stuff that matters.
Re:Compile-time safety for enumerations in Go by taeric on Friday September 29, 2023 @01:55PM (#37707867)
I 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.

Re:Compile-time safety for enumerations in Go by kiitos on Friday September 29, 2023 @02:43PM (#37708510)
> 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.

Re:Compile-time safety for enumerations in Go by throwaway46281 on Saturday September 30, 2023 @09:18AM (#37715157)
To 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?