|
|
Subscribe / Log in / New account

Obsolete C for you and me

Obsolete C for you and me

Posted Dec 11, 2023 19:20 UTC (Mon) by wahern (subscriber, #37304)
In reply to: Obsolete C for you and me by mb
Parent article: Modern C for Fedora (and the world)

I just tested on OpenBSD/amd64 and it compiles and runs despite the diagnostics and bugs. What does that say? I don't think it changes anything.

The places where the code falters largely relate to 1) its support for pre-ANSI C library interfaces, 2) a newer hardware architecture exposing non-standard code, and 3) non-POSIX extension APIs (e.g. gettext). I think this says something positive regarding the value of standards and backward compatibility.

Notably, some of the code does use K&R parameter lists. (At least the getopt_long compat implementation does, but on OpenBSD it was properly excluded from the build.) I'm not advocating for continued support for K&R, just pushing back against the notion that old code, and support for old code, has little value. 20 years isn't even that long in the grand scheme of things, especially in the context of a systems language like C.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds