Remix.run Logo
▲ ahoka a day ago

I have always thought about C being a language with "simple" syntax (but things like type declarations are hell), but very complicated semantics.

▲1718627440 21 hours ago | parent [-]

I think one of the issue in C is that some semantics do not have a syntax, you simply are required to write the code according to it. For example values/objects actually do have a type (effective type) and that is fundamentally what is deciding whether your access is UB. But you never declare that, you simply need to use the right type on access. Or there are ownership semantics in C, every usable interface description describes them in prose. If it's not defined, you are almost guaranteed to invoke UB. That's why I get a bit annoyed if Rust fanboys act like they own the concept of ownership, no it exists in C as well, but C does have different ownership semantics.