Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!uxc!uxc.cso.uiuc.edu!uxd.cso.uiuc.edu!uxe.cso.uiuc.edu!mcdonald From: mcdonald@uxe.cso.uiuc.edu Newsgroups: comp.lang.c Subject: Re: Book on Microsoft C Message-ID: <225800146@uxe.cso.uiuc.edu> Date: 27 Mar 89 14:39:00 GMT References: <754@oravax.UUCP> Lines: 42 Nf-ID: #R:oravax.UUCP:754:uxe.cso.uiuc.edu:225800146:000:2049 Nf-From: uxe.cso.uiuc.edu!mcdonald Mar 27 08:39:00 1989 >A while ago, someone wrote: >> I am looking for a good book on Microsoft C (version 5). >Why are there so many books on particular implementations of >languages? C is supposed to be, and can be, quite portable. >To be sure, there will always be compiler-specific details, which >are the proper province of the compiler user's manuals. Those >manuals are not always well-written, but they usually tell you >how to invoke the compiler, which ideally is the only compiler- >specific detail you'd need to know. All of the language >extensions inevitably provided should be avoided whenever >possible, not exploited. >It bugs me to glance into a technical bookstore and see shelf >after shelf of "Programming in Turbo C," "Graphics programming >for the IBM PC," etc. These books may be the only source of >important documentation, which the irresponsible vendors have >neglected to provide, but they also teach you (if only >implicitly) to write machine-, system-, compiler-, and device- >dependent code. The answer is that if one wants to maufacture a competitive program, especially but not exclusively, a commercial one, one MUST must exploit machine specific features to the fullest. Portability is sometimes possible for the "inner works" of a program, but the outer parts, that a user sees, must be tailored for the machine at hand - to use its specific file formats, its specific method of getting keyboard and mouse input, its specific output format (both thext and graphics), use its most efficient method of IO, etc. Anything else is folly. Standard languages are, by fiat of the standards committees, crippled. For example, in C there is no official way to get keyboard input without blocking (i.e. see if a key has been hit.) You HAVE to use machine specific routines. "Portability" is a word seldom heard outside the academic discussions of Usenet. If it is (for example, in the inner sanctum of Lotus, inc, it generally in the context - Oh my God! why did we decide to do THAT - a year late and 50% as fast!!!!.) Doug McDonald