Re:The C juggernaut illustrated (2012)
by mgaunard on Saturday February 04, 2023 @05:05PM
(#34658884)
Did you not get the memo? C was replaced by C++.
Many languages are trying to replace C++ and failing to do so.
Re:The C juggernaut illustrated (2012)
by steveklabnik on Saturday February 04, 2023 @06:05PM
(#34659377)
Just so you know, K&R style function definitions were removed in C23.
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2841.htm (90% sure but not 100% sure that’s the actual final link, if I’m wrong happy to be corrected!)
Rust is not mentioned as a justification.
There are times when I work with old C code. Just the other day, I added proper C prototypes to a project, and immediately found several bugs with the code, like "this function is expecting a char **, the variable being passed in is char **, but it the address to the char ** is being passed" type bugs because the programmer wasn't able to keep all the details in their head.
Since then, we have ANCI c, which I got use to prototypes, but I still prefer K&R. At least for now, ANSI has yet to get anal about variable types and memory. I hope that never happens but I fear c is heading in that direction because of what the rust people are doing.