From: janis_papanagnou+ng@hotmail.com   
      
   On 27.10.2025 21:48, Keith Thompson wrote:   
   > bart writes:   
   >> [...]   
   > [...]   
   >   
   > In my personal opinion, C's declaration syntax, cleverly based   
   > on a somewhat loose "declaration follows use" principle,   
      
   IMO that was the idea, and I would object to the word "cleverly".   
      
   When I spoke with students, newbie "C" users, about that they were   
   quite confused, not only by the "same" placement as in expressions   
   but also by using the same symbol for conceptually different things.   
      
   Personally I always found it better comprehensible where languages   
   use something like, say,   
      
    REF sometype x;   
      
   and   
      
    y = DEREF x   
      
   in the first place.   
      
   If you explain things that way people much easier understand it, as   
   far as my experience goes.   
      
   > 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. [...]   
      
   > 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.   
      
   Indeed.   
      
   >   
   > 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.   
      
   Yes.   
      
   > 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.   
      
   But interestingly, as far as I recall, the C committee did exactly   
   that with the function declaration syntax option (back then when   
   going from K&R to a standard). Sure, they might handle that now   
   differently since it's their standard to change (and not the K&R   
   origin [or quasi standard]).   
      
   Janis   
      
   > [...]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|