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,177 of 243,242   
   Keith Thompson to Bart   
   Re: printf and time_t   
   06 Feb 26 12:56:01   
   
   From: Keith.S.Thompson+u@gmail.com   
      
   Bart  writes:   
   > On 06/02/2026 19:21, Keith Thompson wrote:   
   >> Bart  writes:   
   >>> On 06/02/2026 13:08, Keith Thompson wrote:   
   >>>> Bart  writes:   
   >>>> [...]   
   >>>>> I guess you've never used printf-family functions via the FFI of   
   >>>>> another language!   
   >>>>   
   >>>> As it happens, I haven't.   
   >>>>   
   >>>> I presume if there were a point, you would have made it by now.   
   >>>   
   >>> I thought you might have infered it.   
   >>>   
   >>> All shortcomings of C can apparently be fixed by employing a selection   
   >>> of it gcc's 200+ options. So no point in making the language better   
   >>> instead.   
   >>>   
   >> Nobody said any of that.   
   >>   
   >>> But that doesn't work when some bits of raw C need to be used from   
   >>> another language. For example, library headers containing a C API,   
   >>> which some languages may use as the basis for their own bindings.   
   >>   
   >> Sure, FFIs can be tricky.   
   >>   
   >> You randomly introduced FFIs into a discussion of printf formats.  What   
   >> irrelevant argument are you going to make next?   
   >> https://en.wikipedia.org/wiki/Gish_gallop   
   >   
   > You seem to have introduced some nonsense of your own.   
      
   What nonsense have I introduced?  please be specific.   
      
   > I'm simply saying that people discussing here C are often blind to its   
   > problems because they employ an advanced C compiler or other   
   > analytical tools to mitigate them.   
      
   People discussing C here are typically very much aware of its problems.   
   Much of what we discuss is methods for using C correctly and, yes,   
   working around its problems.   
      
   > You can't do that if working with raw C like I do. I've been using C   
   > libraries via FFIs and C header files for about 30 years.   
      
   Good for you.  Most of the rest of us don't use FFIs.  But if you   
   want help using them, you could ask specific questions, and it's   
   likely that someone here would be willing and able to answer them.   
      
   > And so, if you want to use *printf functions like that, then the fact   
   > that gcc can sometimes report on incorrect format codes is no help at   
   > all; I'm not using gcc, /or/ writing C!   
      
   OK, so some warnings produced by gcc (and other compilers) that I find   
   useful are not useful to you.   
      
   So what?  What do you expect anyone here to do about it?   
      
   You seem to be complaining that calling C's printf from another   
   language via an FFI is difficult.  I can certainly believe that   
   it is.  Do you actually need to do that?  I have some thoughts   
   about alternative approaches, which I'll be glad to discuss --   
   if and only if you ask.   
      
   > It doesn't help when I'm writing C either, as I either use lesser   
   > compilers, or use gcc without any fancy options.   
   >   
   > I believe a language should stand by itself and not rely on complex   
   > tooling to make it practical to use. Not even syntax highlighting   
   > should be necessary.   
      
   News flash: Bart doesn't like C.   
      
   --   
   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)   

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


(c) 1994,  bbs@darkrealms.ca