[moving to COFF as this has drifted away from Unix]

On Sat, Sep 28, 2024 at 2:06 PM Larry McVoy <lm@mcvoy.com> wrote:
 
I have a somewhat different view.  I have a son who is learning to program
and he asked me about C.  I said "C is like driving a sports car on a
twisty mountain road that has cliffs and no guard rails.  If you want to
check your phone while you are driving, it's not for you.  It requires
your full, focussed attention.  So that sounds bad, right?  Well, if
you are someone who enjoys driving a sports car, and are good at it,
perhaps C is for you."

If you really want a language with no guard rails, try programming in BLISS.

Regarding C and C++ having dangerous language features--of course they do.  Every higher-level language I've ever seen has its set of toxic language features that should be avoided if you want reliability and maintainability for your programs.  And a set of things to avoid if you want portability.

Regarding managed dynamic memory allocation schemes that use garbage collection vs. malloc()/free(), there are some applications where they are not suitable.  I'm thinking about real-time programs.  You can't have your missle defense software pause to do garbage collection when you're trying to shoot down an incoming ballistic missile.

-Paul W.