Without `static`, compiler exports a symbol. $ cat value.c int value = 42; int get_value() { return value; } $ make value.o gcc -c -o value.o value.c $ nm value.o 0000000000000000 T get_value U _GLOBAL_OFFSET_TABLE_ 0000000000000000 D value This symbol, not being `const` can be modified by any other compilation unit. $ cat main.c #include int value; int get_value(); int main() { value = 123456789; printf("%d\n", get_…
I quite like C syntax, and I sometimes long for a language that would change a few elements (default to const and static, different/safer standard api for strings). Some might call it Go but a simple slightly updated C would be nice.
And arrays are bounds checked by default, no more issues with them (and strings are arrays)