Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!mips!apple!motcsd!hpda!hpcupt1!jamiller From: jamiller@hpcupt1.HP.COM (Jim Miller) Newsgroups: comp.lang.misc Subject: Re: setjmp() (was Re: Relationship between C and C++) Message-ID: <6000006@hpcupt1.HP.COM> Date: 23 Mar 90 21:10:10 GMT References: <1990Mar22.162737.9371@craycos.com> Organization: Hewlett Packard, Cupertino Lines: 51 >Which is a quite reasonable argument. Pointer-safe languages generally >require garbage-collected heaps, which means size. So I can see that >a language like C which is required to run on Machines With Tiny >Brains will not be "safe" in that respect. > >But, this leaves two issues open: (i) why C has such an idiotic >syntax, arbitrary type-checking, lax compile-time checks and so on, >and (ii) why people think that C's features provide "power" in >general-purpose programming. Point (i) is an accident of history. >Point (ii) still intrigues me. > > Nick. IMHO, IMHO, IMHO, . . . ("~>" means "approximately said") ~>(i) why C has such: ~> 1) idiotic syntax in general, I don't think it does (IMHO). If you are regarding the crypticness, then I think it is less cryptic than APL, and a whole lot more useful than most of the alternatives. I really love "+=" and "++". Some "problems" (my favorites are "==" and switch's "break"), but in the whole I'm a C lover (but don't tell by wife, pardon, significant other). ~> 2) arbitrary type-checking Ok, Ok, I think that lint should to a better job. Especially with typedefs. ~> 3) lax compile-time checks I define the compiler as "cc" + "lint". If you want checks, use lint, if you want code, use cc. Among other things, this makes cc FAST. It is not unusual for all the code on a machine to be re-make'd overnight when a new version of the OS comes out (at least we had to do it sometimes with BSD). With most languages it might have been a week long effort. I know of customers which *will not* recompile, due to the impact on the time their operation -- one just better find a better way. They are not using C. ~> 4) and so on. ~>(ii) why people think that C's features provide "power" IMHO, C is not a high level language, but a powerful, & semi portable, assembler. With C one can usually get more direct access to OS and machine features than are available with most alternates. Speed freaks like having a good understanding of the code that is emitted, and C seems to fit the bill better than many other languages, though this statement could easily start a religious war (nix nix IMHO IMHO) jim - i'm not even sure these are my opinions - miller