Re:C array types are weird
by cozzyd on Tuesday May 26, 2026 @11:48PM
(#48289385)
And yet so few other languages attempt to have a stable ABI (other than by...mimicking C).
[ Parent
| on HN ]
Re:C array types are weird
by throwaway27448 on Wednesday May 27, 2026 @01:37AM
(#48290099)
The ABI is not the issue.
It's an issue if you want different software components to talk to each other without IPC.
Re:C array types are weird
by throwaway27448 on Wednesday May 27, 2026 @03:43PM
(#48299500)
Most languages can interoperate with the C abi without commiting you to using the language itself. In fact I can't think of a single language that both produces software people actually use and doesn't interoperate with the c abi.
C doesn't have a stable ABI, most folks mistake the ABI from OS written in C, with an imaginary C ABI.
OS ABIs are usually stable though ;)
Finally someone getting it right though. C doesn't have any ABI per se, compilers need to implement whatever ABI a specific operating system defines (otherwise the language would be pretty useless since it couldn't call into operating system functions).
Re:C array types are weird
by throwaway27448 on Wednesday May 27, 2026 @03:21AM
(#48290834)
Even then, arrays can be encoded and enforced on each side. It would be simpler to enforce this via the abi—but the abi itself does not open issues with array description and access