Talk:C (programming language)

This is an old revision of this page, as edited by Tim Starling (talk | contribs) at 07:51, 26 June 2003 (moved comment). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Do you think it's good to use Evolution for writing down the changes, or K and R C will suffice? Thanks, Uriyan

Actually I don't think either topic deserves a sub-page. I think a section on the main page would do. --drj


=== Eccentricity ===
In C, the months of the year are numbered wrong. They are all low by 1. For example: January is month 0. December is month 11. This is not an obvious problem to English-speakers, but if your native language uses numbers to name the months of the year...

Numbering from 0 is not eccentricity. It's how computers think. --Taw

That also has nothing at all to do with the C language, but with the standard libraries--that distinction should be made. --LDC

I don't even think thats an eccentricity since its fairly common in programming to do it that way --Alan D

Fairly common today, but it wasn't in the Good Old Days. That makes it a fad, albeit a fairly long running one. Hint: make a list of languages since Day 1 and see when numbering from 0 began. GregLindahl

Java uses the same numbering scheme. Possibly because there is a zero-based array of month names. Although numbering from zero in both C and Java is more of a convenience for the routines that perform array handling than anything else. If your array starts at ___location AC00, the address of the 0th element is AC00, the address of element 1 is AC00 + element_length, the address of the 2nd element is AC00 + 2 * element_length, and so on. I prefer to start at element 1, but we're all pretty much stuck with the convention. (Perhaps I'll step up and start writing about software engineering, something I actually have some expertise in.) Ed Poor


Example date (works for C and Java): May 29
Month=4, day=29

Why is the month shifted but not the day of the month? Besides, if it is "the month is not a number", you deserve a slap in the face from your Korean (or Japanese or Chinese) secretary; ask her about it! In all these languages, May is literally "five month". (I think.) -- Juuitchan


The claim that C is the dominant microcomputer applications language is now somewhat dubious, IMHO. In the Windows world, it's probably a toss-up between Microsoft's C++ and Visual Basic, I'd guess. C still rules for embedded systems (that is, the ones not written in Assembler), in the Unix world (particularly for apps that don't have a GUI), and people who can't be bothered remembering C++'s arcane semantics for multiple inheritance and operator overloading :) --Robert Merkel

How much Visual C++ is actually plain C with a tiny bit of C++ here and there? GregLindahl
Good question, but one which I don't know the answer to. The only big Windows development project I ever saw was in "real" C++, with a class hierachy etc. etc. It was an absolute PITA to work with, though - in the end I just gave up and wrote the code I needed by monitoring a socket interface this code had with a socket monitor I ginned up with Cygwin.--Robert Merkel
Any windows programming that uses MFC is making extensive use of C++, just by virtue of modelling windows in terms of objects. I think that's actually a good portion of Visual C++ programming.
Yup. Visual C++ (the language) is mostly C++. Of course, the product Microsoft Studio, Visual C++, has compilers for both the language C and the language C++ (and options to turn microsoft extensions to both of those language on or off). Secretly the two compilers are the same, but accepting different input languages.

Recent stats of what percent of code in RedHat distro is written in which programing language, clearly shows that C is dominant, at least on Unices. It's very probable that C++ is much more popular on Windoze world, but I seriously doubt that many apps are written in VB. --Taw


Are we talking commercial apps or what? VB is insanely popular inside IT departments, but for commercial software its always been limited by that damn runtime DLL. C++ seems to rule commercial apps. As for C, its probly less common on windows than C++ at this point.


How can I learn C++ Vera Cruz


It would be nice to have links to an online manual and online tutorials. There probably are some with under the GNU Free Documentation License. --Hirzel


comp.lang.c (a wonderful resource for C, btw -- some very competent people there) recommends Tom Torfs' tutorial at http://www.geocities.com/tom_torfs/c.html and Steve Summit's class notes at http://www.eskimo.com/~scs/cclass/cclass.html.

Honestly, most online tutorials for C are terrible and demonstrate that the author has little clue about the actual C standard. --mgmei


Moved from article:

C is a high level language, meaning that the source code of a program can be written without detailed knowledge of the computer's CPU type. Before the program can be used, the source code must be translated into the required machine language by a compiler. In contrast, programs written in an assembly language can only be run on one type of CPU.
(The above definition of high level language is not meaningful. Consider the evolution of the x86 instruction set toward virtual machinehood. Does this mean that x86 assembly is a high level language?)