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 243,170 of 243,242   
   David Brown to Michael S   
   Re: printf and time_t   
   06 Feb 26 14:06:25   
   
   From: david.brown@hesbynett.no   
      
   On 06/02/2026 13:47, Michael S wrote:   
   > On Fri, 6 Feb 2026 12:39:55 +0000   
   > Bart  wrote:   
   >   
   >> On 06/02/2026 05:10, Keith Thompson wrote:   
   >>> Bart  writes:   
   >>> [...]   
   >>>> /Some/ compilers with /some/ options will /sometimes/ tell you when   
   >>>> you've got it wrong.   
   >>>>   
   >>>> But you first have to make an educated guess, or put in some dummy   
   >>>> format code.   
   >>>>   
   >>>> Eventually, it will compile. Until someone else builds your   
   >>>> program, using a slightly different set of headers where certain   
   >>>> types are defined, and then it might either give compiler messages   
   >>>> that they have to fix, or it show wrong results.   
   >>>   
   >>> That's not how I do it, and I don't think it's how most programmers   
   >>> do it.   
   >>>   
   >>> I know the rules well enough that I can usually write a correct   
   >>> format string in the first place.  If I make a mistake, gcc's   
   >>> warnings are a nice check.   
   >>   
   >> I guess you've never used printf-family functions via the FFI of   
   >> another language!   
   >>   
   >>   
   >   
   > Vararg via FFI? Is it really a good idea?   
   >   
      
   No.   
      
   Every language I have used has had its own way to handle printing.   
   Usually that is more convenient, in at least some aspects, than C's   
   printf family.   
      
   But if some other language wants to do its printing by calling C's   
   printf, and that leads to troubles or limitations, that's the fault of   
   the other language.   
      
   (We can recall that Bart has regularly blamed C for issues,   
   complications or limitations in his own language - as though the   
   original designers of C had an obligation to make it easier for Bart to   
   make tools for a completely different language.)   
      
   --- 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