Hacker News new | ask | show | jobs
by cisrockandroll 12 days ago
So what is the solution, rewrite in Rust?
1 comments

The solution was not to take C into widespread use in first place.

Note that even C creators, first came up with Alef for Plan 9, which did not work out due to lack of automatic resource management (on Rob Pike's own words), and then Limbo for Inferno, which by then meant C main purpose was the OS itself and DisVM/JIT implementation.

Even on classical UNIX, there used to be a tendency that many userspace tools were to be written on top of scripting like AWK, sed, tr, Perl,... not everything to be C.

In terms of systems programming safety that people wonder about Zig, was already there in languages like JOVIAL, PL/I and NEWP, among others, a decade before C came to be.

The solution is not to write new code in C, unless there is no alternative, like coding on UNIX/POSIX kernels (UNIX based on Ada or Pascal dialects like did not fair that well, e.g. Domain/OS).

Not everything has to be Rust, it can be Ada, Modula-2 (now on GCC), D, Swift, FreePascal/Delphi, Zig, Odin, C++ (proper C++ with standard library, not code C with C++ compiler), C# AOT, Java AOT, Go, .... whatever depending on the use case.