Comment by lelanthran

Comment by lelanthran 8 hours ago

0 replies

> the whole point of this is to claim “hey, C does too have typesafety” —if you use a modern language with actual typesafety,

I'm afraid the point was not some childish and immature comparison of C with modern languages.

The point was to demonstrate what type safety there is, and how to use it. The advantages of modern languages are even acknowledged:

> Much to the surprise of, well, everybody, C actually has type safety. Sure, it isn’t as enforceable as (for example) Rust… and, sure, if you are willing to do extra work you can bypass it,

The entire point of TFA is actually in TFA:

> The problem isn’t that C lacks type safety (it clearly enforces most types in most expressions), it’s that raw pointers do not encode semantics (e.g., a char * doesn’t tell you if it’s an email, a name, or a filename).