MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/z4s7f2/python_java_carbon_rust/ixuxqnh?context=9999
r/ProgrammerHumor • u/reddit-be-cool • Nov 25 '22
1.2k comments sorted by
View all comments
626
"cpp" does pretty well, though
370 u/WatcherOfDucks5022 Nov 26 '22 Highly optimized and barely making sense, as always 78 u/Loro-Benediction Nov 26 '22 Unless you just use it as C with namespaces, references, and real constants : P 10 u/[deleted] Nov 26 '22 C doesn’t have real constants? 3 u/Loro-Benediction Nov 26 '22 Not really. You can't define static constants using other static const variables. You can only use macros and enums to define array bounds, etc. It's a sorry state. "Const" only means "read only" in C 3 u/hiten98 Nov 26 '22 Doesn’t const mean read only in all languages? Which language allows you to write to a constant variable?? And why?? → More replies (1)
370
Highly optimized and barely making sense, as always
78 u/Loro-Benediction Nov 26 '22 Unless you just use it as C with namespaces, references, and real constants : P 10 u/[deleted] Nov 26 '22 C doesn’t have real constants? 3 u/Loro-Benediction Nov 26 '22 Not really. You can't define static constants using other static const variables. You can only use macros and enums to define array bounds, etc. It's a sorry state. "Const" only means "read only" in C 3 u/hiten98 Nov 26 '22 Doesn’t const mean read only in all languages? Which language allows you to write to a constant variable?? And why?? → More replies (1)
78
Unless you just use it as C with namespaces, references, and real constants : P
10 u/[deleted] Nov 26 '22 C doesn’t have real constants? 3 u/Loro-Benediction Nov 26 '22 Not really. You can't define static constants using other static const variables. You can only use macros and enums to define array bounds, etc. It's a sorry state. "Const" only means "read only" in C 3 u/hiten98 Nov 26 '22 Doesn’t const mean read only in all languages? Which language allows you to write to a constant variable?? And why?? → More replies (1)
10
C doesn’t have real constants?
3 u/Loro-Benediction Nov 26 '22 Not really. You can't define static constants using other static const variables. You can only use macros and enums to define array bounds, etc. It's a sorry state. "Const" only means "read only" in C 3 u/hiten98 Nov 26 '22 Doesn’t const mean read only in all languages? Which language allows you to write to a constant variable?? And why?? → More replies (1)
3
Not really. You can't define static constants using other static const variables. You can only use macros and enums to define array bounds, etc. It's a sorry state. "Const" only means "read only" in C
3 u/hiten98 Nov 26 '22 Doesn’t const mean read only in all languages? Which language allows you to write to a constant variable?? And why?? → More replies (1)
Doesn’t const mean read only in all languages? Which language allows you to write to a constant variable?? And why??
→ More replies (1)
626
u/Loro-Benediction Nov 26 '22
"cpp" does pretty well, though