Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!adam.pika.mit.edu!scs From: scs@adam.pika.mit.edu (Steve Summit) Newsgroups: comp.lang.c Subject: Re: C/2 under OS/2 Keywords: why are the libraries not provided? Message-ID: <10131@bloom-beacon.MIT.EDU> Date: 27 Mar 89 05:49:55 GMT References: <357@rruxd.UUCP> <8903172140.AA04348@explorer.dgp.toronto.edu> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: scs@adam.pika.mit.edu (Steve Summit) Distribution: na Lines: 52 In article <357@rruxd.UUCP> wws@rruxd.UUCP (W W Scott) writes: >I'm trying to compile a C program under IBM's C/2 but the libraries containing >the standard C functions can not be found.... In article <8903172140.AA04348@explorer.dgp.toronto.edu> flaps@dgp.toronto.edu (Alan J Rosenthal) writes: >I can't believe it! C/2 .. half a C compiler! hee hee hee This isn't even funny. There were some sample programs included with Microsoft's version 5.1 compiler which I thought I'd try (what a stupid idea). One #included , and then made calls to some nonportable-looking timing routines, nowhere to be found, inexplicably named DosSleep and DosTime. Whenever people develop new machines, languages, or operating systems, there is this apparently irrestible urge to invent completely new ways of doing everything. ("Let's see, we'll need routines to open a file; and get the time of day; and write characters to the screen. What shall we call them? How about OpenUpATextFile, get_time_of_day, and SCREEN$PUTCHARACTERWITHATTRIBUTEWITHOUTMOVINGCURSOR. Now we'll just rewrite all our old programs to use the new routines...") Here's a tip for all of the simpleminded reimplementors out there who think they can show off their creativity by thinking up new names for everything: YOU DON'T HAVE TO DO THIS. You don't have to invent whole sets of routines, forgetting, until later, a few important ones which then have to be crudely wedged in. You don't have to invalidate every program written so far, and commit hordes of programmers to tedious and error-prone neverending rewriting tasks. You could (take a deep breath and brace yourself; I know this is an earthshattering, revolutionaly concept) use something that already exists. If you're writing a C run-time library, and you're contemplating a feature that X3J11 covers, use the ANSI feature. If it's an OS-dependent or Unixy thing that X3J11 doesn't cover, but P1003 (Posix) does, use the Posix feature. Barring that, use any old Unix feature, or VMS, or even DOS, for all I care. But use something that exists, and might have a shred of experience behind it, and which might be utilized by a few lines of existing code. Even if the adopted solution is compatible with only 1 out of N existing machines, or operating systems, or languages, or display devices, or whatever, that's better than the 0 out of N+1 ratio you're guaranteed to get by adding yet another one. I'm not saying "stifle creativity." If you're doing something brand new, innovate to your heart's content. But things like opening files and sleeping for a certain number of seconds are ancient history; they're old-hat; they're not that interesting. Go out and make some real progress instead. Steve Summit scs@adam.pika.mit.edu