6 ms·
"Else you end up with frankenstein code where every file could use a different style." Yeah, this is a huge problem, but also, in the long run, inevitable. Pl
by inglor_cz 2y ago
"Else you end up with frankenstein code where every file could use a different style."
Yeah, this is a huge problem, but also, in the long run, inevitable.
Plenty of Kernighan & Ritchie C code still out there...
- wbl 2y agoAlmost none: ANSI was over 30 years ago and enough of an improvement people switched. If you mean C89 then yes, loads of it.
- skissane 2y agoIt helps there are automated tools for converting old style K&R function declarations to the new ANSI/ISO style, like protoize. But K&R C is now so dated, protoize was removed from GCC 4.5 and onwards. When (in a bout of idiosyncrasy) I wanted to convert some ancient K&R C to new style a couple of years back, I ended up putting GCC 4.4 in a Docker container to make it easier: https://github.com/skissane/protoize https://github.com/skissane/protoize