Sure, as long as you run it in Netscape Navigator 2.0.
In 2021 you're lucky if a JavaScript web app that worked fine on Tuesday still works on Wednesday. And shocked if it works in any browser other than Chrome.
Browsers too take backwards compatibility very seriously and features stop working almost only if these are serious security holes.
However, the thing that broke Tuesday's app on Wednesday was probably a library or framework change.
:)
ANSI CL was last ratified in 1994; there has been no standard language change, and the community language improvements are just macro libraries. You should be able to take your alexandria utilities library, or optima pattern matching or whatever back to 1995.
Use some of the -W* flags (-Wall -Wpedantic -Wconversion, ...) and specify the standard -std=c90.
Avoid undefined behaviors:
- https://en.cppreference.com/w/c/language/behavior
- https://wiki.sei.cmu.edu/confluence/display/c
(Also use cppcheck, valgrind, gdb, astyle, make, ...)
Done.
Fun fact: JS and C are both standardized by ISO.
P.S. and old code definitely needs them, as at the time compilers didn't optimize so aggressively and lots of code does weird stuff with memory, shifts, etc.
-- https://www.bell-labs.com/usr/dmr/www/chist.html
Unfortunately since 1979, majority of C devs think they know better.
This single thing in isolation should never cast code as good or bad.
For instance, in 2003 there was no such thing as a mobile phone; passing code review today is probably going to entail either being responsive, or directing to a mobile version when accessed from a mobile device.
Fun fact: code written in JavaScript in 1995 will work in 2021, after 26 years.
If you are talking about "good practices" - few weeks ago I worked with C code from 2001 and it was just awful. Yes, it compiles - but it wouldn't pass any modern code review.