From: Keith.S.Thompson+u@gmail.com   
      
   bart writes:   
   > On 25/10/2025 16:18, David Brown wrote:   
   [...]   
   >> And I'd love to hear your plan for "fixing" the syntax of C - noting   
   >> that changing the syntax of C means getting the C standards   
   >> committee to accept your suggestions, getting at least all major C   
   >> compilers to support them, and getting the millions of C programmers   
   >> to use them.   
   >   
   > I have posted such proposals in the past (probably before 2010).   
   >   
   > I can't remember the exact details, but I think it is possible to   
   > superimpose LTR type syntax on top of the existing language.   
   [...]   
      
   If I understand correctly (you haven't been entirely clear about it),   
   your proposal is to create a new friendlier declaration syntax for C,   
   and have a new version of C support both the existing syntax and your   
   new syntax. So in your hypothetical future C, one might have:   
      
    int *const *p1;   
    p1: pointer to const pointer to int;   
      
   in the same program.   
      
   I haven't seen a *concrete* proposal. If I thought the whole thing   
   were a good idea, I'd encourage you to write one.   
      
   In my personal opinion, C's declaration syntax, cleverly based   
   on a somewhat loose "declaration follows use" principle, is a not   
   entirely successful experiment that has caught on extraordinarily   
   well, probably due to C's other advantages as a systems programming   
   language. I would have preferred a different syntax **if** it had   
   been used in the original C **instead of** the current syntax.   
   I do not think C's syntax is any kind of "joke", as you do.   
   It's entirely consistent and well defined.   
      
   All else being equal, I would prefer a C-like language with clear   
   left-to-right declaration syntax to C as it's currently defined.   
   But all else is not at all equal.   
      
   And I think that a future C that supports *both* the existing   
   syntax and your new syntax would be far worse than C as it is now.   
   Programmers would have to learn both. Existing code would not   
   be updated. Most new code, written by experienced C programmers,   
   would continue to use the old syntax. Your plan to deprecate the   
   existing syntax would fail.   
      
   And that's why it will never happen. The ISO C committee would never   
   consider this kind of radical change, even if it were shoehorned   
   into the syntax in a way that somehow doesn't break existing code.   
      
   You have spent years complaining here about C's syntax (to people   
   who are not in a position to do anything about it). If you had   
   spent half that time learning how it works, you'd be a world-class   
   expert by now, and you could teach others how to use it rather than   
   deliberately confusing them with contrived examples.   
      
   You can of course create your own language with a cleaner syntax.   
   Apparently you've done so, but not in a way that's useful to most   
   of us -- not that you're obligated to make it useful to anyone else.   
      
   --   
   Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com   
   void Void(void) { Void(); } /* The recursive call of the void */   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|