Re:Why aren't there C conferences? (2018)
by WalterBright on Saturday August 27, 2022 @02:05AM
(#32616210)
The C Standard library bakes in the use of 0-termination for strings. There's nothing about 0 terminated strings that is the way CPUs work.
[ Parent
| on HN ]
Re:Why aren't there C conferences? (2018)
by kcexn on Monday September 05, 2022 @07:17PM
(#32730633)
C defines an abstract computing model. It's not that CPU's work with 0 terminated strings. It's that the compiler will always ensure that 0 terminated strings make sense on any arbitrary architecture.
If you're a hardware designer building a microcontroller for a gas heater, you can just target the 'C' model, and you can have a high degree of confidence that anything defined by C will work.
This isn't the case for say Python, since lots of behaviour is defined abstractly in terms of API's and program behaviour (what we want the programmer to worry about), not in terms of memory allocation, and register widths etc. That a hardware designer can design to.