4 ms·
Around that time we had K&R c, which I liked because no really messing around with prototypes. Were Pascal, IIRC you had to deal with prototypes and variable t
by jmclnx 4y ago
Around that time we had K&R c, which I liked because no really messing around with prototypes. Were Pascal, IIRC you had to deal with prototypes and variable types and other things.
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.
- mgaunard 4y agoDid you not get the memo? C was replaced by C++. Many languages are trying to replace C++ and failing to do so.
- steveklabnik 4y agoJust so you know, K&R style function definitions were removed in C23. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2841.htm 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.
- spc476 4y agoThere 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.