home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 241,556 of 243,242   
   Waldek Hebisch to David Brown   
   Re: New and improved version of cdecl   
   27 Oct 25 22:33:14   
   
   From: antispam@fricas.org   
      
   David Brown  wrote:   
   > On 26/10/2025 16:12, bart wrote:   
   >> On 25/10/2025 16:18, David Brown wrote:   
   >>> On 25/10/2025 14:51, bart wrote:   
   >>>   
   >>>> This is another matter. The CDECL docs talk about C and C++ type   
   >>>> declarations being 'gibberish'.   
   >>>>   
   >>>> What do you feel about that, and the *need* for such a substantial   
   >>>> tool to help understand or write such declarations?   
   >>>>   
   >>>> I would rather have put some effort into fixing the syntax so that   
   >>>> such tools are not necessary!   
   >>   
   >>> 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).   
   >>   
   >   
   > No, you have not.   
   >   
   > What you have proposed is a different way to write types in   
   > declarations, in a different language.  That's fine if you are making a   
   > different language.  (For the record, I like some of your suggestions,   
   > and dislike others - my own choice for an "ideal" syntax would be   
   > different from both your syntax and C's.)   
   >   
   > I asked you if you had a plan for /fixing/ the syntax of /C/.  You don't.   
   >   
   > As an analogy, suppose I invited you - as an architect and builder - to   
   > see my house, and you said you didn't like the layout of the rooms, the   
   > kitchen was too small, and you thought the cellar was pointless   
   > complexity.  I ask you if you can give me a plan to fix it, and you   
   > respond by telling me your own house is nicer.   
      
   Sorry, "proof by analogy" is usually wrong.  If you insist on   
   analogies the right one would be function prototypes: old style   
   function declarations where inherently unsafe and it was fixed   
   by adding new syntax for function declarations and definitions,   
   in parallel to old syntax.  Now old style declarations are   
   officially retired.  Bart proposed new syntax for all   
   declarations to be used in parallel with old ones, that is   
   exaclty the same fix as used to solve unsafety of old   
   function declarations.   
      
   IMO the worst C problem is standard process.  Basically, once   
   a large vendor manages to subvert the language it gets   
   legitimized and part of the standard.  OTOH old warts are   
   preserved for long time.  Worse, new warts are introduced.   
      
   As an example, VMT-s were big opportunity to make array access   
   safer.  But version which is in the standard skilfully   
   sabotages potential compiler attempts to increase safety.   
      
   If you look carefuly, there is several places in the standard   
   that effectively forbid static or dynamic error checks.  Once   
   you add extra safety checks your implementation is   
   noncompilant.   
      
   It is likely that any standarized language is eventually   
   doomed to failure.  This is pretty visible with Cobol,   
   but C seem to be on similar trajectory (but in much earlier   
   stage).   
      
   --   
                                 Waldek Hebisch   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca